Add help, don't build winstaller by default, add skip

This commit is contained in:
Damien Guard 2016-08-11 11:51:08 -07:00 committed by Nathan Sobo
parent d735f59b75
commit 89152fbf58

View File

@ -6,7 +6,16 @@
require('coffee-script/register')
require('colors')
const argv = require('yargs').argv
const argv = require('yargs')
.usage('Usage: $0 [options]')
.help('help')
.describe('skip-rebuild', 'Skip rebuilding steps (to perform other optional steps)')
.describe('code-sign', 'Sign the executables (key specified in env vars)')
.describe('create-installer', 'Create an installer (Windows only)')
.describe('compress-artifacts', 'Compress Atom binaries (and symbols on macOS)')
.describe('install', 'Install the built version of Atom')
.argv
const cleanOutputDirectory = require('./lib/clean-output-directory')
const codeSignOnMac = require('./lib/code-sign-on-mac')
const compressArtifacts = require('./lib/compress-artifacts')
@ -30,6 +39,7 @@ process.on('unhandledRejection', function (e) {
process.exit(1)
})
if (!argv.skipRebuild) {
cleanOutputDirectory()
copyAssets()
transpileBabelPaths()
@ -41,6 +51,7 @@ prebuildLessCache()
generateMetadata()
generateAPIDocs()
downloadChromedriver()
}
dumpSymbols()
.then(packageApplication)
.then(packagedAppPath => {
@ -52,7 +63,12 @@ dumpSymbols()
}
return Promise.resolve(packagedAppPath)
} else if (process.platform === 'win32') {
if (argv.createInstaller) {
return createWindowsInstaller(packagedAppPath, argv.codeSign).then(() => packagedAppPath)
}
else {
console.log('Skipping installer. Specify the --create-installer option to create a Squirrel-based Windows installer.'.gray)
}
} else {
return Promise.resolve(packagedAppPath)
}