| 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 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 168     # Historically we didn't use relative paths when requiring modules, so in | 168     # Historically we didn't use relative paths when requiring modules, so in | 
| 169     # order for webpack to know where to find them we need to pass in a list of | 169     # order for webpack to know where to find them we need to pass in a list of | 
| 170     # resolve paths. Going forward we should always use relative paths, once we | 170     # resolve paths. Going forward we should always use relative paths, once we | 
| 171     # do that consistently this can be removed. See issues 5760, 5761 and 5762. | 171     # do that consistently this can be removed. See issues 5760, 5761 and 5762. | 
| 172     resolve_paths = [os.path.join(base_extension_path, dir, 'lib') | 172     resolve_paths = [os.path.join(base_extension_path, dir, 'lib') | 
| 173                      for dir in ['', 'adblockpluscore', 'adblockplusui']] | 173                      for dir in ['', 'adblockpluscore', 'adblockplusui']] | 
| 174 | 174 | 
| 175     info_template = getTemplate(info_templates[params['type']]) | 175     info_template = getTemplate(info_templates[params['type']]) | 
| 176     info_module = info_template.render( | 176     info_module = info_template.render( | 
| 177         basename=params['metadata'].get('general', 'basename'), | 177         basename=params['metadata'].get('general', 'basename'), | 
| 178         version=params['metadata'].get('general', 'version') | 178         version=params['version'] | 
| 179     ).encode('utf-8') | 179     ).encode('utf-8') | 
| 180 | 180 | 
| 181     configuration = { | 181     configuration = { | 
| 182         'bundles': [], | 182         'bundles': [], | 
| 183         'extension_path': base_extension_path, | 183         'extension_path': base_extension_path, | 
| 184         'info_module': info_module, | 184         'info_module': info_module, | 
| 185         'resolve_paths': resolve_paths, | 185         'resolve_paths': resolve_paths, | 
| 186     } | 186     } | 
| 187 | 187 | 
| 188     for item in params['metadata'].items('bundles'): | 188     for item in params['metadata'].items('bundles'): | 
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 396     if devenv: | 396     if devenv: | 
| 397         add_devenv_requirements(files, metadata, params) | 397         add_devenv_requirements(files, metadata, params) | 
| 398 | 398 | 
| 399     zipdata = files.zipToString() | 399     zipdata = files.zipToString() | 
| 400     signature = None | 400     signature = None | 
| 401     pubkey = None | 401     pubkey = None | 
| 402     if keyFile != None: | 402     if keyFile != None: | 
| 403         signature = signBinary(zipdata, keyFile) | 403         signature = signBinary(zipdata, keyFile) | 
| 404         pubkey = getPublicKey(keyFile) | 404         pubkey = getPublicKey(keyFile) | 
| 405     writePackage(outFile, pubkey, signature, zipdata) | 405     writePackage(outFile, pubkey, signature, zipdata) | 
| OLD | NEW | 
|---|