Compress artifacts when passing --compress-artifacts to script/build

This commit is contained in:
Antonio Scandurra
2016-08-09 13:28:59 +02:00
parent 2db3ee9ee9
commit 6d803ed3a4
5 changed files with 60 additions and 9 deletions

View File

@@ -9,6 +9,7 @@ require('colors')
const argv = require('yargs').argv
const cleanOutputDirectory = require('./lib/clean-output-directory')
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 dumpSymbols = require('./lib/dump-symbols')
@@ -52,6 +53,12 @@ dumpSymbols()
return createWindowsInstaller(packagedAppPath, argv.codeSign).then(() => packagedAppPath)
}
}).then(packagedAppPath => {
if (argv.compressArtifacts) {
compressArtifacts(packagedAppPath)
} else {
console.log('Skipping artifacts compression. Specify the --compress-artifacts option to compress Atom binaries (and symbols on macOS)'.gray)
}
if (argv.install) {
installApplication(packagedAppPath)
} else {