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

Unified Diff: releaseAutomation.py

Issue 29357701: Issue 4548 - Split out Safari and add Edge release automation (Closed)
Patch Set: Avoid linting errors Created Oct. 26, 2016, 3:16 p.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 | « packagerEdge.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: releaseAutomation.py
diff --git a/releaseAutomation.py b/releaseAutomation.py
index 8625a3e802a3589f53a563a3dd720b7a658aa15b..b808b6e1a806a43839d7136ecbce3336a8c70508 100644
--- a/releaseAutomation.py
+++ b/releaseAutomation.py
@@ -43,9 +43,13 @@ def create_sourcearchive(repo, output):
process.wait()
-def run(baseDir, type, version, keyFiles, downloadsRepo):
+def run(baseDir, type, version, keyFile, downloadsRepo):
if type == 'gecko':
import buildtools.packagerGecko as packager
+ elif type == 'safari':
+ import buildtools.packagerSafari as packager
+ elif type == 'edge':
+ import buildtools.packagerEdge as packager
elif type == 'chrome':
import buildtools.packagerChrome as packager
@@ -76,32 +80,34 @@ def run(baseDir, type, version, keyFiles, downloadsRepo):
# Now commit the change and tag it
subprocess.check_call(['hg', 'commit', '-R', baseDir, '-m', 'Releasing %s %s' % (extensionName, version)])
- subprocess.check_call(['hg', 'tag', '-R', baseDir, '-f', version])
+ tag_name = version
+ if type in {'safari', 'edge'}:
+ tag_name += '-' + type
Sebastian Noack 2016/10/27 10:57:32 Nit: As per our coding style, we use the format()
kzar 2016/10/27 15:25:58 Do you insist? IMO `tag_name += '-' + type` is nic
Sebastian Noack 2016/10/27 15:41:59 This might be a matter of taste. I think the strin
kzar 2016/10/27 15:54:25 Done.
+ subprocess.check_call(['hg', 'tag', '-R', baseDir, '-f', tag_name])
# Create a release build
downloads = []
if type == 'gecko':
- keyFile = keyFiles[0] if keyFiles else None
- metadata = packager.readMetadata(baseDir, type)
buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata, version, 'xpi'))
- packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=True, keyFile=keyFile)
+ packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=True)
downloads.append(buildPath)
elif type == 'chrome':
- # We actually have to create three different builds: signed and unsigned
- # Chrome builds (the latter for Chrome Web Store), and a signed Safari build.
- metadata = packager.readMetadata(baseDir, type)
+ # Create both signed and unsigned Chrome builds (the latter for Chrome Web Store).
buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata, version, 'crx'))
- packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=True, keyFile=keyFiles[0])
+ packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=True, keyFile=keyFile)
downloads.append(buildPath)
buildPathUnsigned = os.path.join(baseDir, packager.getDefaultFileName(metadata, version, 'zip'))
packager.createBuild(baseDir, type=type, outFile=buildPathUnsigned, releaseBuild=True, keyFile=None)
-
- import buildtools.packagerSafari as packagerSafari
- metadataSafari = packagerSafari.readMetadata(baseDir, 'safari')
- buildPathSafari = os.path.join(downloadsRepo, packagerSafari.getDefaultFileName(metadataSafari, version, 'safariextz'))
- packagerSafari.createBuild(baseDir, type='safari', outFile=buildPathSafari, releaseBuild=True, keyFile=keyFiles[1])
- downloads.append(buildPathSafari)
+ elif type == 'safari':
+ buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata, version, 'safariextz'))
+ packager.createBuild(baseDir, type='safari', outFile=buildPath, releaseBuild=True, keyFile=keyFile)
+ downloads.append(buildPath)
+ elif type == 'edge':
+ # We only offer the Edge extension for use through the Windows Store
+ buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(metadata, version, 'appx'))
+ packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=True)
+ downloads.append(buildPath)
# Create source archive
archivePath = os.path.splitext(buildPath)[0] + '-source.tgz'
« no previous file with comments | « packagerEdge.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld