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

Delta Between Two Patch Sets: build.py

Issue 29365583: Issue 4670 - Add a new build type for Gecko-based WebExtensions (Closed) Base URL: https://hg.adblockplus.org/buildtools
Left Patch Set: Created Nov. 29, 2016, 1:50 p.m.
Right Patch Set: Split out info module into a Chrome and Gecko specific one Created Dec. 3, 2016, 7:02 p.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 | « no previous file | packagerChrome.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import shutil 9 import shutil
10 import buildtools 10 import buildtools
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 kwargs['keyFile'] = value 188 kwargs['keyFile'] = value
189 elif option in {'-m', '--multi-compartment'} and type == 'gecko': 189 elif option in {'-m', '--multi-compartment'} and type == 'gecko':
190 kwargs['multicompartment'] = True 190 kwargs['multicompartment'] = True
191 elif option in {'-r', '--release'}: 191 elif option in {'-r', '--release'}:
192 kwargs['releaseBuild'] = True 192 kwargs['releaseBuild'] = True
193 if len(args) > 0: 193 if len(args) > 0:
194 kwargs['outFile'] = args[0] 194 kwargs['outFile'] = args[0]
195 195
196 if type == 'gecko': 196 if type == 'gecko':
197 import buildtools.packagerGecko as packager 197 import buildtools.packagerGecko as packager
198 elif type == 'chrome' or type == 'gecko-webext': 198 elif type in {'chrome', 'gecko-webext'}:
199 import buildtools.packagerChrome as packager 199 import buildtools.packagerChrome as packager
200 elif type == 'safari': 200 elif type == 'safari':
201 import buildtools.packagerSafari as packager 201 import buildtools.packagerSafari as packager
202 elif type == 'edge': 202 elif type == 'edge':
203 import buildtools.packagerEdge as packager 203 import buildtools.packagerEdge as packager
204 204
205 packager.createBuild(baseDir, type=type, **kwargs) 205 packager.createBuild(baseDir, type=type, **kwargs)
206 206
207 207
208 def runAutoInstall(baseDir, scriptName, opts, args, type): 208 def runAutoInstall(baseDir, scriptName, opts, args, type):
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 def readLocaleConfig(baseDir, type, metadata): 247 def readLocaleConfig(baseDir, type, metadata):
248 if type == 'gecko': 248 if type == 'gecko':
249 import buildtools.packagerGecko as packager 249 import buildtools.packagerGecko as packager
250 localeDir = packager.getLocalesDir(baseDir) 250 localeDir = packager.getLocalesDir(baseDir)
251 localeConfig = { 251 localeConfig = {
252 'name_format': 'BCP-47', 252 'name_format': 'BCP-47',
253 'file_format': 'gecko-dtd', 253 'file_format': 'gecko-dtd',
254 'target_platforms': {'gecko'}, 254 'target_platforms': {'gecko'},
255 'default_locale': packager.defaultLocale 255 'default_locale': packager.defaultLocale
256 } 256 }
257 elif type == 'chrome' or type == 'gecko-webext': 257 elif type in {'chrome', 'gecko-webext'}:
258 import buildtools.packagerChrome as packager 258 import buildtools.packagerChrome as packager
259 localeDir = os.path.join(baseDir, '_locales') 259 localeDir = os.path.join(baseDir, '_locales')
260 localeConfig = { 260 localeConfig = {
261 'name_format': 'ISO-15897', 261 'name_format': 'ISO-15897',
262 'file_format': 'chrome-json', 262 'file_format': 'chrome-json',
263 'target_platforms': {'chrome'}, 263 'target_platforms': {'chrome'},
264 'default_locale': packager.defaultLocale, 264 'default_locale': packager.defaultLocale,
265 } 265 }
266 else: 266 else:
267 localeDir = os.path.join( 267 localeDir = os.path.join(
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 if option in ('-h', '--help'): 598 if option in ('-h', '--help'):
599 usage(scriptName, type, command) 599 usage(scriptName, type, command)
600 sys.exit() 600 sys.exit()
601 commands[command](baseDir, scriptName, opts, args, type) 601 commands[command](baseDir, scriptName, opts, args, type)
602 else: 602 else:
603 print 'Command %s is not supported for this application type' % comm and 603 print 'Command %s is not supported for this application type' % comm and
604 usage(scriptName, type) 604 usage(scriptName, type)
605 else: 605 else:
606 print 'Command %s is unrecognized' % command 606 print 'Command %s is unrecognized' % command
607 usage(scriptName, type) 607 usage(scriptName, type)
LEFTRIGHT
« no previous file | packagerChrome.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld