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

Delta Between Two Patch Sets: releaseAutomation.py

Issue 5108575248580608: Issue 412 - Make sure release automation creates Safari builds (Closed)
Left Patch Set: Created May 2, 2014, 7:10 a.m.
Right Patch Set: Created May 2, 2014, 10:50 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « build.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This file is part of the Adblock Plus build tools, 3 # This file is part of the Adblock Plus build tools,
4 # Copyright (C) 2006-2014 Eyeo GmbH 4 # Copyright (C) 2006-2014 Eyeo GmbH
5 # 5 #
6 # Adblock Plus is free software: you can redistribute it and/or modify 6 # Adblock Plus is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License version 3 as 7 # it under the terms of the GNU General Public License version 3 as
8 # published by the Free Software Foundation. 8 # published by the Free Software Foundation.
9 # 9 #
10 # Adblock Plus is distributed in the hope that it will be useful, 10 # Adblock Plus is distributed in the hope that it will be useful,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 locales = packagerGecko.readLocaleMetadata(locales_base, [packagerGecko.defaul tLocale]) 49 locales = packagerGecko.readLocaleMetadata(locales_base, [packagerGecko.defaul tLocale])
50 extensionName = locales[packagerGecko.defaultLocale]['name'] 50 extensionName = locales[packagerGecko.defaultLocale]['name']
51 51
52 # Now commit the change and tag it 52 # Now commit the change and tag it
53 subprocess.check_call(['hg', 'commit', '-R', baseDir, '-m', 'Releasing %s %s' % (extensionName, version)]) 53 subprocess.check_call(['hg', 'commit', '-R', baseDir, '-m', 'Releasing %s %s' % (extensionName, version)])
54 subprocess.check_call(['hg', 'tag', '-R', baseDir, '-f', version]) 54 subprocess.check_call(['hg', 'tag', '-R', baseDir, '-f', version])
55 55
56 # Create a release build 56 # Create a release build
57 downloads = [] 57 downloads = []
58 if type == "gecko": 58 if type == "gecko":
59 keyFile = keyFiles[0] if len(keyFiles) else None 59 keyFile = keyFiles[0] if keyFiles else None
Sebastian Noack 2014/05/02 08:29:09 len() isn't needed here, since empty lists evaluat
60 metadata = packager.readMetadata(baseDir, type) 60 metadata = packager.readMetadata(baseDir, type)
61 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(baseDir, metadata, version, 'xpi')) 61 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(baseDir, metadata, version, 'xpi'))
62 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFile) 62 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFile)
63 downloads.append(buildPath) 63 downloads.append(buildPath)
64 elif type == "chrome": 64 elif type == "chrome":
65 # We actually have to create four different builds for Chrome: signed a unsi gned Chrome builds 65 # We actually have to create four different builds for Chrome: signed a unsi gned Chrome builds
66 # (the latter for Chrome Web Store), a signed Opera build and a signed Safar i build. 66 # (the latter for Chrome Web Store), a signed Opera build and a signed Safar i build.
67 metadata = packager.readMetadata(baseDir, type) 67 metadata = packager.readMetadata(baseDir, type)
68 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(baseDir, metadata, version, 'crx')) 68 buildPath = os.path.join(downloadsRepo, packager.getDefaultFileName(baseDir, metadata, version, 'crx'))
69 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFiles[0]) 69 packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=Tru e, keyFile=keyFiles[0])
Sebastian Noack 2014/05/02 08:29:09 Why don't you handle missing keyFiles here, but fo
Wladimir Palant 2014/05/02 10:50:50 An unsigned release for Gecko is an option and we
Sebastian Noack 2014/05/02 10:54:15 Agreed.
70 downloads.append(buildPath) 70 downloads.append(buildPath)
71 71
72 buildPathUnsigned = os.path.join(baseDir, packager.getDefaultFileName(baseDi r, metadata, version, 'zip')) 72 buildPathUnsigned = os.path.join(baseDir, packager.getDefaultFileName(baseDi r, metadata, version, 'zip'))
73 packager.createBuild(baseDir, type=type, outFile=buildPathUnsigned, releaseB uild=True, keyFile=None) 73 packager.createBuild(baseDir, type=type, outFile=buildPathUnsigned, releaseB uild=True, keyFile=None)
74 74
75 metadataOpera = packager.readMetadata(baseDir, "opera") 75 metadataOpera = packager.readMetadata(baseDir, "opera")
76 buildPathOpera = os.path.join(downloadsRepo, packager.getDefaultFileName(bas eDir, metadataOpera, version, 'crx')) 76 buildPathOpera = os.path.join(downloadsRepo, packager.getDefaultFileName(bas eDir, metadataOpera, version, 'crx'))
77 packager.createBuild(baseDir, type="opera", outFile=buildPathOpera, releaseB uild=True, keyFile=keyFiles[0]) 77 packager.createBuild(baseDir, type="opera", outFile=buildPathOpera, releaseB uild=True, keyFile=keyFiles[0])
78 downloads.append(buildPathOpera) 78 downloads.append(buildPathOpera)
79 79
(...skipping 21 matching lines...) Expand all
101 archiveHandle.close() 101 archiveHandle.close()
102 downloads.append(archivePath) 102 downloads.append(archivePath)
103 103
104 # Now add the downloads and commit 104 # Now add the downloads and commit
105 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads) 105 subprocess.check_call(['hg', 'add', '-R', downloadsRepo] + downloads)
106 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing % s %s' % (extensionName, version)]) 106 subprocess.check_call(['hg', 'commit', '-R', downloadsRepo, '-m', 'Releasing % s %s' % (extensionName, version)])
107 107
108 # Push all changes 108 # Push all changes
109 subprocess.check_call(['hg', 'push', '-R', baseDir]) 109 subprocess.check_call(['hg', 'push', '-R', baseDir])
110 subprocess.check_call(['hg', 'push', '-R', downloadsRepo]) 110 subprocess.check_call(['hg', 'push', '-R', downloadsRepo])
LEFTRIGHT
« build.py ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld