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 os | 5 import os |
6 import sys | 6 import sys |
7 import re | 7 import re |
8 import subprocess | 8 import subprocess |
9 import shutil | 9 import shutil |
10 import buildtools | 10 import buildtools |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 return | 449 return |
450 | 450 |
451 import buildtools.releaseAutomation as releaseAutomation | 451 import buildtools.releaseAutomation as releaseAutomation |
452 releaseAutomation.run(baseDir, type, version, keyFile, downloadsRepo) | 452 releaseAutomation.run(baseDir, type, version, keyFile, downloadsRepo) |
453 | 453 |
454 | 454 |
455 def updatePSL(baseDir, scriptName, opts, args, type): | 455 def updatePSL(baseDir, scriptName, opts, args, type): |
456 import buildtools.publicSuffixListUpdater as publicSuffixListUpdater | 456 import buildtools.publicSuffixListUpdater as publicSuffixListUpdater |
457 publicSuffixListUpdater.updatePSL(baseDir) | 457 publicSuffixListUpdater.updatePSL(baseDir) |
458 | 458 |
| 459 |
459 with addCommand(lambda baseDir, scriptName, opts, args, type: usage(scriptName,
type), ('help', '-h', '--help')) as command: | 460 with addCommand(lambda baseDir, scriptName, opts, args, type: usage(scriptName,
type), ('help', '-h', '--help')) as command: |
460 command.shortDescription = 'Show this message' | 461 command.shortDescription = 'Show this message' |
461 | 462 |
462 with addCommand(runBuild, 'build') as command: | 463 with addCommand(runBuild, 'build') as command: |
463 command.shortDescription = 'Create a build' | 464 command.shortDescription = 'Create a build' |
464 command.description = 'Creates an extension build with given file name. If o
utput_file is missing a default name will be chosen.' | 465 command.description = 'Creates an extension build with given file name. If o
utput_file is missing a default name will be chosen.' |
465 command.params = '[options] [output_file]' | 466 command.params = '[options] [output_file]' |
466 command.addOption('Only include the given locales (if omitted: all locales n
ot marked as incomplete)', short='l', long='locales', value='l1,l2,l3', types=('
gecko')) | 467 command.addOption('Only include the given locales (if omitted: all locales n
ot marked as incomplete)', short='l', long='locales', value='l1,l2,l3', types=('
gecko')) |
467 command.addOption('Use given build number (if omitted the build number will
be retrieved from Mercurial)', short='b', long='build', value='num') | 468 command.addOption('Use given build number (if omitted the build number will
be retrieved from Mercurial)', short='b', long='build', value='num') |
468 command.addOption('File containing private key and certificates required to
sign the package', short='k', long='key', value='file', types=('chrome', 'safari
')) | 469 command.addOption('File containing private key and certificates required to
sign the package', short='k', long='key', value='file', types=('chrome', 'safari
')) |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 if option in ('-h', '--help'): | 601 if option in ('-h', '--help'): |
601 usage(scriptName, type, command) | 602 usage(scriptName, type, command) |
602 sys.exit() | 603 sys.exit() |
603 commands[command](baseDir, scriptName, opts, args, type) | 604 commands[command](baseDir, scriptName, opts, args, type) |
604 else: | 605 else: |
605 print 'Command %s is not supported for this application type' % comm
and | 606 print 'Command %s is not supported for this application type' % comm
and |
606 usage(scriptName, type) | 607 usage(scriptName, type) |
607 else: | 608 else: |
608 print 'Command %s is unrecognized' % command | 609 print 'Command %s is unrecognized' % command |
609 usage(scriptName, type) | 610 usage(scriptName, type) |
OLD | NEW |