Left: | ||
Right: |
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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
328 file.write(pubkey) | 328 file.write(pubkey) |
329 file.write(signature) | 329 file.write(signature) |
330 file.write(zipdata) | 330 file.write(zipdata) |
331 | 331 |
332 | 332 |
333 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False): | 333 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False): |
334 metadata = readMetadata(baseDir, type) | 334 metadata = readMetadata(baseDir, type) |
335 version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum) | 335 version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum) |
336 | 336 |
337 if outFile == None: | 337 if outFile == None: |
338 outFile = getDefaultFileName(metadata, version, 'crx' if keyFile else 'z ip') | 338 if type == 'gecko-webext': |
339 file_extension = 'xpi' | |
Sebastian Noack
2016/12/01 16:24:54
So do I understand correctly, that WebExtensions f
Wladimir Palant
2016/12/01 21:39:31
Yes, there is only a difference for signed package
| |
340 else: | |
341 file_extension = 'crx' if keyFile else 'zip' | |
342 outFile = getDefaultFileName(metadata, version, file_extension) | |
339 | 343 |
340 params = { | 344 params = { |
341 'type': type, | 345 'type': type, |
342 'baseDir': baseDir, | 346 'baseDir': baseDir, |
343 'releaseBuild': releaseBuild, | 347 'releaseBuild': releaseBuild, |
344 'version': version, | 348 'version': version, |
345 'devenv': devenv, | 349 'devenv': devenv, |
346 'metadata': metadata, | 350 'metadata': metadata, |
347 } | 351 } |
348 | 352 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmp l', | 388 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmp l', |
385 ('general', 'testScripts')) | 389 ('general', 'testScripts')) |
386 | 390 |
387 zipdata = files.zipToString() | 391 zipdata = files.zipToString() |
388 signature = None | 392 signature = None |
389 pubkey = None | 393 pubkey = None |
390 if keyFile != None: | 394 if keyFile != None: |
391 signature = signBinary(zipdata, keyFile) | 395 signature = signBinary(zipdata, keyFile) |
392 pubkey = getPublicKey(keyFile) | 396 pubkey = getPublicKey(keyFile) |
393 writePackage(outFile, pubkey, signature, zipdata) | 397 writePackage(outFile, pubkey, signature, zipdata) |
OLD | NEW |