Download Chromedriver during script/build

...so that we can cache it.
This commit is contained in:
Antonio Scandurra
2016-08-11 12:54:30 +02:00
parent 6a99bb38ba
commit ff9fb6edce
3 changed files with 3 additions and 4 deletions

View File

@@ -12,6 +12,7 @@ const codeSignOnMac = require('./lib/code-sign-on-mac')
const compressArtifacts = require('./lib/compress-artifacts')
const copyAssets = require('./lib/copy-assets')
const createWindowsInstaller = require('./lib/create-windows-installer')
const downloadChromedriver = require('./lib/download-chromedriver')
const dumpSymbols = require('./lib/dump-symbols')
const generateAPIDocs = require('./lib/generate-api-docs')
const generateMetadata = require('./lib/generate-metadata')
@@ -39,6 +40,7 @@ generateModuleCache()
prebuildLessCache()
generateMetadata()
generateAPIDocs()
downloadChromedriver()
dumpSymbols()
.then(packageApplication)
.then(packagedAppPath => {

View File

@@ -29,7 +29,7 @@ module.exports = function () {
const chromedriverDirPath = path.join(CONFIG.electronDownloadPath, 'chromedriver')
unzipPath(chromedriverZipPath, chromedriverDirPath)
} else {
throw new Error('Downloading chromedriver for platforms other than macOS is unsupported!')
console.log('Skipping Chromedriver download because it is used only on macOS'.gray)
}
}

View File

@@ -5,7 +5,6 @@
require('colors')
const async = require('async')
const childProcess = require('child_process')
const downloadChromedriver = require('./lib/download-chromedriver')
const fs = require('fs')
const path = require('path')
@@ -16,8 +15,6 @@ const packagedAppPath = path.resolve(__dirname, '..', 'out', `${appName}.app`)
const executablePath = path.join(packagedAppPath, 'Contents', 'MacOS', appName)
const resourcePath = CONFIG.repositoryRootPath
downloadChromedriver()
function runCoreMainProcessTests (callback) {
const testPath = path.join(CONFIG.repositoryRootPath, 'spec', 'main-process')
const testArguments = [