Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This Source Code Form is subject to the terms of the Mozilla Public | 3 # This Source Code Form is subject to the terms of the Mozilla Public |
4 # License, v. 2.0. If a copy of the MPL was not distributed with this | 4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
6 | 6 |
7 import sys | 7 import sys |
8 import os | 8 import os |
9 import re | 9 import re |
10 import json | 10 import json |
11 import struct | 11 import struct |
12 import io | 12 import io |
13 from StringIO import StringIO | 13 from StringIO import StringIO |
14 | 14 |
15 import packager | 15 import packager |
16 from packager import readMetadata, getMetadataPath, getDefaultFileName, getBuild Version, getTemplate, Files | 16 from packager import readMetadata, getMetadataPath, getDefaultFileName, getBuild Version, getTemplate, Files |
17 | 17 |
18 defaultLocale = 'en_US' | 18 defaultLocale = 'en_US' |
19 | 19 |
20 def getIgnoredFiles(params): | 20 def getIgnoredFiles(params): |
21 return ['store.description'] | 21 return {'store.description'} |
Wladimir Palant
2016/01/14 19:28:04
This should still be a set - even with one entry,
Sebastian Noack
2016/01/14 23:28:41
Not that it matters with a single item, but done.
| |
22 | 22 |
23 def getPackageFiles(params): | 23 def getPackageFiles(params): |
24 result = set(('_locales', 'icons', 'jquery-ui', 'lib', 'skin', 'ui', 'ext')) | 24 result = set(('_locales', 'icons', 'jquery-ui', 'lib', 'skin', 'ui', 'ext')) |
25 | 25 |
26 if params['devenv']: | 26 if params['devenv']: |
27 result.add('qunit') | 27 result.add('qunit') |
28 | 28 |
29 baseDir = params['baseDir'] | 29 baseDir = params['baseDir'] |
30 for file in os.listdir(baseDir): | 30 for file in os.listdir(baseDir): |
31 if file.endswith('.js') or file.endswith('.html') or file.endswith('.xml'): | 31 if file.endswith('.js') or file.endswith('.html') or file.endswith('.xml'): |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
361 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl', | 361 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl', |
362 ('general', 'testScripts')) | 362 ('general', 'testScripts')) |
363 | 363 |
364 zipdata = files.zipToString() | 364 zipdata = files.zipToString() |
365 signature = None | 365 signature = None |
366 pubkey = None | 366 pubkey = None |
367 if keyFile != None: | 367 if keyFile != None: |
368 signature = signBinary(zipdata, keyFile) | 368 signature = signBinary(zipdata, keyFile) |
369 pubkey = getPublicKey(keyFile) | 369 pubkey = getPublicKey(keyFile) |
370 writePackage(outFile, pubkey, signature, zipdata) | 370 writePackage(outFile, pubkey, signature, zipdata) |
LEFT | RIGHT |