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

Unified Diff: releaseAutomation.py

Issue 29562599: Issue 5751 - Removing legacy gecko support (Closed)
Patch Set: Created Oct. 2, 2017, 10:33 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
Index: releaseAutomation.py
diff --git a/releaseAutomation.py b/releaseAutomation.py
index a309ec81526fb1d373a7530271fe854dc8a77332..cd06e9df57751ba4785ee5df73570664cf915d5f 100644
--- a/releaseAutomation.py
+++ b/releaseAutomation.py
@@ -12,6 +12,7 @@ import tarfile
import json
from packager import readMetadata, getDefaultFileName
+from localeTools import readFile
Sebastian Noack 2017/10/03 02:22:39 Why did you add this import?
tlucas 2017/10/04 11:48:38 This was not intentional, removed it.
def get_dependencies(prefix, repos):
@@ -118,9 +119,7 @@ def run(baseDir, type, version, keyFile, downloadsRepo):
print('Aborting release.')
return 1
- if type == 'gecko':
- import buildtools.packagerGecko as packager
- elif type == 'safari':
+ if type == 'safari':
import buildtools.packagerSafari as packager
elif type == 'edge':
import buildtools.packagerEdge as packager
@@ -142,15 +141,13 @@ def run(baseDir, type, version, keyFile, downloadsRepo):
file.truncate()
# Read extension name from locale data
- import buildtools.packagerGecko as packagerGecko
- if type == 'gecko':
- locales_base = baseDir
- else:
- # This is somewhat of a hack but reading out locale import config here would be too much
- locales_base = os.path.join(baseDir, 'adblockplus')
+ locales_base = os.path.join(baseDir, 'adblockplus')
- locales = packagerGecko.readLocaleMetadata(locales_base, [packagerGecko.defaultLocale])
- extensionName = locales[packagerGecko.defaultLocale]['name']
+ with open(os.path.join(locales_base, 'chrome', 'locale',
+ packager.defaultLocale.replace('_', '-'),
+ 'meta.json'),
+ 'r') as fp:
+ extensionName = json.load(fp)['name']
# Now commit the change and tag it
subprocess.check_call(['hg', 'commit', '-R', baseDir, '-m', 'Releasing %s %s' % (extensionName, version)])
@@ -161,11 +158,7 @@ def run(baseDir, type, version, keyFile, downloadsRepo):
# Create a release build
downloads = []
- if type == 'gecko':
- buildPath = os.path.join(downloadsRepo, getDefaultFileName(metadata, version, 'xpi'))
- packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=True)
- downloads.append(buildPath)
- elif type == 'chrome':
+ if type == 'chrome':
# Create both signed and unsigned Chrome builds (the latter for Chrome Web Store).
buildPath = os.path.join(downloadsRepo, getDefaultFileName(metadata, version, 'crx'))
packager.createBuild(baseDir, type=type, outFile=buildPath, releaseBuild=True, keyFile=keyFile)
« localeTools.py ('K') | « packagerGecko.py ('k') | templates/bootstrap.js.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld