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

Side by Side Diff: packagerChrome.py

Issue 29572692: Issue 5845 - Renaming gecko-webext to gecko (Closed)
Patch Set: Created Oct. 10, 2017, 1:14 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build.py ('k') | templates/manifest.json.tmpl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 errno 5 import errno
6 import io 6 import io
7 import json 7 import json
8 import os 8 import os
9 import re 9 import re
10 from StringIO import StringIO 10 from StringIO import StringIO
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 file.write(pubkey) 303 file.write(pubkey)
304 file.write(signature) 304 file.write(signature)
305 file.write(zipdata) 305 file.write(zipdata)
306 306
307 307
308 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False): 308 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False):
309 metadata = readMetadata(baseDir, type) 309 metadata = readMetadata(baseDir, type)
310 version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum) 310 version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum)
311 311
312 if outFile == None: 312 if outFile == None:
313 if type == 'gecko-webext': 313 if type == 'gecko':
314 file_extension = 'xpi' 314 file_extension = 'xpi'
315 else: 315 else:
316 file_extension = 'crx' if keyFile else 'zip' 316 file_extension = 'crx' if keyFile else 'zip'
317 outFile = getDefaultFileName(metadata, version, file_extension) 317 outFile = getDefaultFileName(metadata, version, file_extension)
318 318
319 params = { 319 params = {
320 'type': type, 320 'type': type,
321 'baseDir': baseDir, 321 'baseDir': baseDir,
322 'releaseBuild': releaseBuild, 322 'releaseBuild': releaseBuild,
323 'version': version, 323 'version': version,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 params, 'testIndex.html.tmpl', ('general', 'testScripts') 359 params, 'testIndex.html.tmpl', ('general', 'testScripts')
360 ) 360 )
361 361
362 zipdata = files.zipToString() 362 zipdata = files.zipToString()
363 signature = None 363 signature = None
364 pubkey = None 364 pubkey = None
365 if keyFile != None: 365 if keyFile != None:
366 signature = signBinary(zipdata, keyFile) 366 signature = signBinary(zipdata, keyFile)
367 pubkey = getPublicKey(keyFile) 367 pubkey = getPublicKey(keyFile)
368 writePackage(outFile, pubkey, signature, zipdata) 368 writePackage(outFile, pubkey, signature, zipdata)
OLDNEW
« no previous file with comments | « build.py ('k') | templates/manifest.json.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld