Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: build.py

Issue 5108575248580608: Issue 412 - Make sure release automation creates Safari builds (Closed)
Patch Set: Created May 2, 2014, 7:10 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | releaseAutomation.py » ('j') | releaseAutomation.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build.py
===================================================================
--- a/build.py
+++ b/build.py
@@ -382,44 +382,47 @@ def generateDocs(baseDir, scriptName, op
'-x=js,jsm',
os.path.join(baseDir, 'lib')]
if quiet:
subprocess.check_output(command)
else:
subprocess.check_call(command)
def runReleaseAutomation(baseDir, scriptName, opts, args, type):
- keyFile = None
+ keyFiles = []
downloadsRepo = os.path.join(baseDir, '..', 'downloads')
for option, value in opts:
if option in ('-k', '--key'):
- keyFile = value
+ keyFiles.append(value)
elif option in ('-d', '--downloads'):
downloadsRepo = value
if len(args) == 0:
print 'No version number specified for the release'
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 keyFile == None:
- if type == "gecko":
- print >>sys.stderr, "Warning: no key file specified, creating an unsigned release build\n"
- else:
- print >>sys.stderr, "Error: key file is required for the release"
- 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:
+ 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, keyFile, downloadsRepo)
+ releaseAutomation.run(baseDir, type, version, keyFiles, downloadsRepo)
def updatePSL(baseDir, scriptName, opts, args, type):
import buildtools.publicSuffixListUpdater as publicSuffixListUpdater
publicSuffixListUpdater.updatePSL(baseDir)
with addCommand(lambda baseDir, scriptName, opts, args, type: usage(scriptName, type), ('help', '-h', '--help')) as command:
command.shortDescription = 'Show this message'
@@ -487,17 +490,17 @@ with addCommand(generateDocs, 'docs') as
command.supportedTypes = ('gecko')
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', 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: one key to sign Chrome builds and another to sign the Safari build.', short='k', long='key', value='file', types=('gecko', 'chrome'))
Sebastian Noack 2014/05/02 08:29:09 You should explicitly mention that the key for Chr
Wladimir Palant 2014/05/02 10:50:50 Done.
Sebastian Noack 2014/05/02 10:54:15 Shouldn'T be a big deal for Chrome, since we have
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', 'opera')
« no previous file with comments | « no previous file | releaseAutomation.py » ('j') | releaseAutomation.py » ('J')

Powered by Google App Engine
This is Rietveld