| Index: build.py |
| =================================================================== |
| --- a/build.py |
| +++ b/build.py |
| @@ -193,16 +193,17 @@ def runBuild(baseDir, scriptName, opts, |
| releaseBuild=releaseBuild, keyFile=keyFile, |
| limitMetadata=limitMetadata, multicompartment=multicompartment) |
| elif type == 'chrome': |
| import buildtools.packagerChrome as packager |
| packager.createBuild(baseDir, outFile=outFile, buildNum=buildNum, |
| releaseBuild=releaseBuild, keyFile=keyFile, |
| experimentalAPI=experimentalAPI) |
| + |
| def runAutoInstall(baseDir, scriptName, opts, args, type): |
| if len(args) == 0: |
| print 'Port of the Extension Auto-Installer needs to be specified' |
| usage(scriptName, type, 'autoinstall') |
| return |
| multicompartment = False |
| for option, value in opts: |
| @@ -213,16 +214,21 @@ def runAutoInstall(baseDir, scriptName, |
| host, port = args[0].rsplit(':', 1) |
| else: |
| host, port = ('localhost', args[0]) |
| import buildtools.packagerGecko as packager |
| packager.autoInstall(baseDir, host, port, multicompartment=multicompartment) |
| +def createDevEnv(baseDir, scriptName, opts, args, type): |
| + import buildtools.packagerChrome as packager |
| + packager.createDevEnv(baseDir) |
| + |
| + |
| def setupTranslations(baseDir, scriptName, opts, args, type): |
| if len(args) < 1: |
| print 'Project key is required to update translation master files.' |
| usage(scriptName, type, 'setuptrans') |
| return |
| key = args[0] |
| @@ -427,16 +433,21 @@ with addCommand(runBuild, 'build') as co |
| with addCommand(runAutoInstall, 'autoinstall') as command: |
| command.shortDescription = 'Install extension automatically' |
| command.description = 'Will automatically install the extension in a browser running Extension Auto-Installer. If host parameter is omitted assumes that the browser runs on localhost.' |
| command.params = '[<host>:]<port>' |
| command.addOption('Create a build for leak testing', short='m', long='multi-compartment') |
| command.supportedTypes = ('gecko') |
| +with addCommand(createDevEnv, 'devenv') as command: |
| + command.shortDescription = 'Set up a development environment' |
| + command.description = 'Will set up or update the devenv folder as an unpacked extension folder for development.' |
| + command.supportedTypes = ('chrome') |
| + |
| with addCommand(setupTranslations, 'setuptrans') as command: |
| command.shortDescription = 'Sets up translation languages' |
| command.description = 'Sets up translation languages for the project on crowdin.net.' |
| command.params = '[options] project-key' |
| command.supportedTypes = ('gecko', 'chrome') |
| with addCommand(updateTranslationMaster, 'translate') as command: |
| command.shortDescription = 'Updates translation master files' |