| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 glob | 6 import glob |
| 7 import io | 7 import io |
| 8 import json | 8 import json |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 314 else: | 314 else: |
| 315 file = outputFile | 315 file = outputFile |
| 316 if pubkey != None and signature != None: | 316 if pubkey != None and signature != None: |
| 317 file.write(struct.pack('<4sIII', 'Cr24', 2, len(pubkey), len(signature)) ) | 317 file.write(struct.pack('<4sIII', 'Cr24', 2, len(pubkey), len(signature)) ) |
| 318 file.write(pubkey) | 318 file.write(pubkey) |
| 319 file.write(signature) | 319 file.write(signature) |
| 320 file.write(zipdata) | 320 file.write(zipdata) |
| 321 | 321 |
| 322 | 322 |
| 323 def add_devenv_requirements(files, metadata, params): | 323 def add_devenv_requirements(files, metadata, params): |
| 324 files.read(os.path.join(os.path.dirname(__file__), | 324 files.read( |
|
kzar
2017/10/18 13:50:26
Nit: IMO this would look nicer indented differentl
tlucas
2017/10/18 14:29:07
Done.
Sebastian Noack
2017/10/18 22:00:44
FWIW, both look good to me.
| |
| 325 'chromeDevenvPoller__.js'), | 325 os.path.join(os.path.dirname(__file__), 'chromeDevenvPoller__.js'), |
| 326 relpath='devenvPoller__.js') | 326 relpath='devenvPoller__.js', |
| 327 ) | |
| 327 files['devenvVersion__'] = str(random.random()) | 328 files['devenvVersion__'] = str(random.random()) |
| 328 | 329 |
| 329 if metadata.has_option('general', 'testScripts'): | 330 if metadata.has_option('general', 'testScripts'): |
| 330 files['qunit/index.html'] = createScriptPage( | 331 files['qunit/index.html'] = createScriptPage( |
| 331 params, 'testIndex.html.tmpl', ('general', 'testScripts') | 332 params, 'testIndex.html.tmpl', ('general', 'testScripts') |
| 332 ) | 333 ) |
| 333 | 334 |
| 334 | 335 |
| 335 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False): | 336 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False): |
| 336 metadata = readMetadata(baseDir, type) | 337 metadata = readMetadata(baseDir, type) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 if devenv: | 379 if devenv: |
| 379 add_devenv_requirements(files, metadata, params) | 380 add_devenv_requirements(files, metadata, params) |
| 380 | 381 |
| 381 zipdata = files.zipToString() | 382 zipdata = files.zipToString() |
| 382 signature = None | 383 signature = None |
| 383 pubkey = None | 384 pubkey = None |
| 384 if keyFile != None: | 385 if keyFile != None: |
| 385 signature = signBinary(zipdata, keyFile) | 386 signature = signBinary(zipdata, keyFile) |
| 386 pubkey = getPublicKey(keyFile) | 387 pubkey = getPublicKey(keyFile) |
| 387 writePackage(outFile, pubkey, signature, zipdata) | 388 writePackage(outFile, pubkey, signature, zipdata) |
| LEFT | RIGHT |