OLD | NEW |
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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 files['manifest.json'] = createManifest(params, files) | 385 files['manifest.json'] = createManifest(params, files) |
386 if type == 'chrome': | 386 if type == 'chrome': |
387 fixTranslationsForCWS(files) | 387 fixTranslationsForCWS(files) |
388 | 388 |
389 if devenv: | 389 if devenv: |
390 import buildtools | 390 import buildtools |
391 import random | 391 import random |
392 files.read(os.path.join(buildtools.__path__[0], 'chromeDevenvPoller__.js
'), relpath='devenvPoller__.js') | 392 files.read(os.path.join(buildtools.__path__[0], 'chromeDevenvPoller__.js
'), relpath='devenvPoller__.js') |
393 files['devenvVersion__'] = str(random.random()) | 393 files['devenvVersion__'] = str(random.random()) |
394 | 394 |
395 if metadata.has_option('general', 'testScripts'): | 395 if metadata.has_option('general', 'testScripts'): |
396 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmp
l', | 396 files['qunit/index.html'] = createScriptPage( |
397 ('general', 'testScripts')) | 397 params, 'testIndex.html.tmpl', ('general', 'testScripts') |
| 398 ) |
398 | 399 |
399 zipdata = files.zipToString() | 400 zipdata = files.zipToString() |
400 signature = None | 401 signature = None |
401 pubkey = None | 402 pubkey = None |
402 if keyFile != None: | 403 if keyFile != None: |
403 signature = signBinary(zipdata, keyFile) | 404 signature = signBinary(zipdata, keyFile) |
404 pubkey = getPublicKey(keyFile) | 405 pubkey = getPublicKey(keyFile) |
405 writePackage(outFile, pubkey, signature, zipdata) | 406 writePackage(outFile, pubkey, signature, zipdata) |
OLD | NEW |