OLD | NEW |
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 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 params = { | 319 params = { |
320 'type': type, | 320 'type': type, |
321 'baseDir': baseDir, | 321 'baseDir': baseDir, |
322 'releaseBuild': releaseBuild, | 322 'releaseBuild': releaseBuild, |
323 'version': version, | 323 'version': version, |
324 'experimentalAPI': experimentalAPI, | 324 'experimentalAPI': experimentalAPI, |
325 'devenv': devenv, | 325 'devenv': devenv, |
326 'metadata': metadata, | 326 'metadata': metadata, |
327 } | 327 } |
328 | 328 |
| 329 skip = metadata.options('mapping') if metadata.has_section('mapping') else [] |
329 files = Files(getPackageFiles(params), getIgnoredFiles(params), | 330 files = Files(getPackageFiles(params), getIgnoredFiles(params), |
330 process=lambda path, data: processFile(path, data, params)) | 331 process=lambda path, data: processFile(path, data, params)) |
331 | 332 |
332 if metadata.has_section('mapping'): | 333 if metadata.has_section('mapping'): |
333 files.readMappedFiles(metadata.items('mapping')) | 334 files.readMappedFiles(metadata.items('mapping')) |
334 files.read(baseDir) | 335 files.read(baseDir, skip=skip) |
335 | 336 |
336 if metadata.has_section('convert_js'): | 337 if metadata.has_section('convert_js'): |
337 convertJS(params, files) | 338 convertJS(params, files) |
338 | 339 |
339 if metadata.has_section('convert_img'): | 340 if metadata.has_section('convert_img'): |
340 from imageConversion import convertImages | 341 from imageConversion import convertImages |
341 convertImages(params, files) | 342 convertImages(params, files) |
342 | 343 |
343 if metadata.has_section('preprocess'): | 344 if metadata.has_section('preprocess'): |
344 files.preprocess( | 345 files.preprocess( |
(...skipping 23 matching lines...) Expand all Loading... |
368 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl', | 369 files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl', |
369 ('general', 'testScripts')) | 370 ('general', 'testScripts')) |
370 | 371 |
371 zipdata = files.zipToString() | 372 zipdata = files.zipToString() |
372 signature = None | 373 signature = None |
373 pubkey = None | 374 pubkey = None |
374 if keyFile != None: | 375 if keyFile != None: |
375 signature = signBinary(zipdata, keyFile) | 376 signature = signBinary(zipdata, keyFile) |
376 pubkey = getPublicKey(keyFile) | 377 pubkey = getPublicKey(keyFile) |
377 writePackage(outFile, pubkey, signature, zipdata) | 378 writePackage(outFile, pubkey, signature, zipdata) |
OLD | NEW |