Index: build.py |
=================================================================== |
--- a/build.py |
+++ b/build.py |
@@ -193,18 +193,19 @@ def runBuild(baseDir, scriptName, opts, |
elif option in ('-m', '--multi-compartment'): |
multicompartment = True |
elif option in ('-r', '--release'): |
releaseBuild = True |
outFile = args[0] if len(args) > 0 else None |
if type == 'gecko': |
import buildtools.packagerGecko as packager |
- packager.createBuild(baseDir, type=type, outFile=outFile, locales=locales, buildNum=buildNum, |
- releaseBuild=releaseBuild, keyFile=keyFile, |
+ packager.createBuild(baseDir, type=type, outFile=outFile, |
+ locales=locales, buildNum=buildNum, |
+ releaseBuild=releaseBuild, |
multicompartment=multicompartment) |
elif type == 'chrome': |
import buildtools.packagerChrome as packager |
packager.createBuild(baseDir, type=type, outFile=outFile, buildNum=buildNum, |
releaseBuild=releaseBuild, keyFile=keyFile) |
elif type == 'safari': |
import buildtools.packagerSafari as packager |
packager.createBuild(baseDir, type=type, outFile=outFile, buildNum=buildNum, |
@@ -443,23 +444,17 @@ def runReleaseAutomation(baseDir, script |
usage(scriptName, type, 'release') |
return |
version = args[0] |
if re.search(r'[^\d\.]', version): |
print 'Wrong version number format' |
usage(scriptName, type, 'release') |
return |
- if type == 'gecko' and len(keyFiles) == 0: |
- print >>sys.stderr, 'Warning: no key file specified, creating an unsigned release build\n' |
- elif type == 'gecko' and len(keyFiles) > 1: |
- print >>sys.stderr, 'Error: too many key files, only one required' |
- usage(scriptName, type, 'release') |
- return |
- elif type == 'chrome' and len(keyFiles) != 2: |
+ if type == 'chrome' and len(keyFiles) != 2: |
print >>sys.stderr, 'Error: wrong number of key files specified, two keys (Chrome and Safari) required for the release' |
usage(scriptName, type, 'release') |
return |
import buildtools.releaseAutomation as releaseAutomation |
releaseAutomation.run(baseDir, type, version, keyFiles, downloadsRepo) |
@@ -471,17 +466,17 @@ with addCommand(lambda baseDir, scriptNa |
command.shortDescription = 'Show this message' |
with addCommand(runBuild, 'build') as command: |
command.shortDescription = 'Create a build' |
command.description = 'Creates an extension build with given file name. If output_file is missing a default name will be chosen.' |
command.params = '[options] [output_file]' |
command.addOption('Only include the given locales (if omitted: all locales not marked as incomplete)', short='l', long='locales', value='l1,l2,l3', types=('gecko')) |
command.addOption('Use given build number (if omitted the build number will be retrieved from Mercurial)', short='b', long='build', value='num') |
- command.addOption('File containing private key and certificates required to sign the package', short='k', long='key', value='file', types=('gecko', 'chrome', 'safari')) |
+ command.addOption('File containing private key and certificates required to sign the package', short='k', long='key', value='file', types=('chrome', 'safari')) |
command.addOption('Create a build for leak testing', short='m', long='multi-compartment', types=('gecko')) |
command.addOption('Create a release build', short='r', long='release') |
command.supportedTypes = ('gecko', 'chrome', 'safari') |
with addCommand(runAutoInstall, 'autoinstall') as command: |
command.shortDescription = 'Install extension automatically' |
command.description = 'Will automatically install the extension in a browser running Extension Auto-Installer. If host parameter is omitted assumes that the browser runs on localhost.' |
command.params = '[<host>:]<port>' |
@@ -529,17 +524,17 @@ with addCommand(generateDocs, 'docs') as |
command.description = 'Generate documentation files and write them into the specified directory. This operation requires JsDoc 3 to be installed.' |
command.addOption('Suppress JsDoc output', short='q', long='quiet') |
command.params = '[options] <directory>' |
command.supportedTypes = ('gecko', 'chrome') |
with addCommand(runReleaseAutomation, 'release') as command: |
command.shortDescription = 'Run release automation' |
command.description = 'Note: If you are not the project owner then you ' "probably don't want to run this!\n\n" 'Runs release automation: creates downloads for the new version, tags ' 'source code repository as well as downloads and buildtools repository.' |
- command.addOption('File containing private key and certificates required to sign the release. Note that for Chrome releases this option needs to be specified twice: first a key to sign Chrome builds, then another to sign the Safari build.', short='k', long='key', value='file', types=('gecko', 'chrome')) |
+ command.addOption('File containing private key and certificates required to sign the release. Note that for Chrome releases this option needs to be specified twice: first a key to sign Chrome builds, then another to sign the Safari build.', short='k', long='key', value='file', types=('chrome',)) |
command.addOption('Directory containing downloads repository (if omitted ../downloads is assumed)', short='d', long='downloads', value='dir') |
command.params = '[options] <version>' |
command.supportedTypes = ('gecko', 'chrome') |
with addCommand(updatePSL, 'updatepsl') as command: |
command.shortDescription = 'Updates Public Suffix List' |
command.description = 'Downloads Public Suffix List (see http://publicsuffix.org/) and generates lib/publicSuffixList.js from it.' |
command.supportedTypes = ('chrome',) |