mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Sign manually without using Squirrel
This commit is contained in:
49
script/build
49
script/build
@@ -10,6 +10,7 @@ require('./bootstrap')
|
||||
require('coffee-script/register')
|
||||
require('colors')
|
||||
|
||||
const path = require('path')
|
||||
const yargs = require('yargs')
|
||||
const argv = yargs
|
||||
.usage('Usage: $0 [options]')
|
||||
@@ -75,34 +76,40 @@ binariesPromise
|
||||
.then(packageApplication)
|
||||
.then(packagedAppPath => generateStartupSnapshot(packagedAppPath).then(() => packagedAppPath))
|
||||
.then(packagedAppPath => {
|
||||
if (process.platform === 'darwin') {
|
||||
if (argv.codeSign) {
|
||||
codeSignOnMac(packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray)
|
||||
}
|
||||
} else if (process.platform === 'win32') {
|
||||
if (argv.createWindowsInstaller) {
|
||||
return createWindowsInstaller(packagedAppPath, argv.codeSign).then(() => packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping creating installer. Specify the --create-windows-installer option to create a Squirrel-based Windows installer.'.gray)
|
||||
switch (process.platform) {
|
||||
case 'darwin': {
|
||||
if (argv.codeSign) {
|
||||
codeSignOnWindows(packagedAppPath)
|
||||
codeSignOnMac(packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray)
|
||||
}
|
||||
}
|
||||
} else if (process.platform === 'linux') {
|
||||
if (argv.createDebianPackage) {
|
||||
createDebianPackage(packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping creating debian package. Specify the --create-debian-package option to create it.'.gray)
|
||||
case 'win32': {
|
||||
if (argv.codeSign) {
|
||||
codeSignOnWindows(path.join(packagedAppPath, 'Atom.exe'))
|
||||
} else {
|
||||
console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray)
|
||||
}
|
||||
if (argv.createWindowsInstaller) {
|
||||
return createWindowsInstaller(packagedAppPath)
|
||||
.then(() => argv.codeSign && codeSignOnWindows(path.join(CONFIG.buildOutputPath, 'AtomSetup.exe')))
|
||||
.then(() => packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping creating installer. Specify the --create-windows-installer option to create a Squirrel-based Windows installer.'.gray)
|
||||
}
|
||||
}
|
||||
case 'linux': {
|
||||
if (argv.createDebianPackage) {
|
||||
createDebianPackage(packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping creating debian package. Specify the --create-debian-package option to create it.'.gray)
|
||||
}
|
||||
|
||||
if (argv.createRpmPackage) {
|
||||
createRpmPackage(packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping creating rpm package. Specify the --create-rpm-package option to create it.'.gray)
|
||||
if (argv.createRpmPackage) {
|
||||
createRpmPackage(packagedAppPath)
|
||||
} else {
|
||||
console.log('Skipping creating rpm package. Specify the --create-rpm-package option to create it.'.gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user