Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: build.py

Issue 29367148: Issue 4720 - Edge packager does not support devenv (Closed)
Patch Set: Rebase Created Sept. 25, 2017, 8:23 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | packagerEdge.py » ('j') | packagerEdge.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 else: 222 else:
223 host, port = ('localhost', args[0]) 223 host, port = ('localhost', args[0])
224 224
225 import buildtools.packagerGecko as packager 225 import buildtools.packagerGecko as packager
226 packager.autoInstall(baseDir, type, host, port, multicompartment=multicompar tment) 226 packager.autoInstall(baseDir, type, host, port, multicompartment=multicompar tment)
227 227
228 228
229 def createDevEnv(baseDir, scriptName, opts, args, type): 229 def createDevEnv(baseDir, scriptName, opts, args, type):
230 if type == 'safari': 230 if type == 'safari':
231 import buildtools.packagerSafari as packager 231 import buildtools.packagerSafari as packager
232 elif type == 'edge':
233 import buildtools.packagerEdge as packager
232 else: 234 else:
233 import buildtools.packagerChrome as packager 235 import buildtools.packagerChrome as packager
234 236
235 file = StringIO() 237 file = StringIO()
236 packager.createBuild(baseDir, type=type, outFile=file, devenv=True, releaseB uild=True) 238 packager.createBuild(baseDir, type=type, outFile=file, devenv=True, releaseB uild=True)
237 239
238 from buildtools.packager import getDevEnvPath 240 from buildtools.packager import getDevEnvPath
239 devenv_dir = getDevEnvPath(baseDir, type) 241 devenv_dir = getDevEnvPath(baseDir, type)
240 242
241 shutil.rmtree(devenv_dir, ignore_errors=True) 243 shutil.rmtree(devenv_dir, ignore_errors=True)
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 with addCommand(runAutoInstall, 'autoinstall') as command: 479 with addCommand(runAutoInstall, 'autoinstall') as command:
478 command.shortDescription = 'Install extension automatically' 480 command.shortDescription = 'Install extension automatically'
479 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.' 481 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.'
480 command.params = '[<host>:]<port>' 482 command.params = '[<host>:]<port>'
481 command.addOption('Create a build for leak testing', short='m', long='multi- compartment') 483 command.addOption('Create a build for leak testing', short='m', long='multi- compartment')
482 command.supportedTypes = ('gecko') 484 command.supportedTypes = ('gecko')
483 485
484 with addCommand(createDevEnv, 'devenv') as command: 486 with addCommand(createDevEnv, 'devenv') as command:
485 command.shortDescription = 'Set up a development environment' 487 command.shortDescription = 'Set up a development environment'
486 command.description = 'Will set up or update the devenv folder as an unpacke d extension folder for development.' 488 command.description = 'Will set up or update the devenv folder as an unpacke d extension folder for development.'
487 command.supportedTypes = ('gecko-webext', 'chrome', 'safari') 489 command.supportedTypes = ('gecko-webext', 'chrome', 'safari', 'edge')
488 490
489 with addCommand(setupTranslations, 'setuptrans') as command: 491 with addCommand(setupTranslations, 'setuptrans') as command:
490 command.shortDescription = 'Sets up translation languages' 492 command.shortDescription = 'Sets up translation languages'
491 command.description = 'Sets up translation languages for the project on crow din.net.' 493 command.description = 'Sets up translation languages for the project on crow din.net.'
492 command.params = '[options] project-key' 494 command.params = '[options] project-key'
493 command.supportedTypes = ('gecko', 'chrome', 'generic') 495 command.supportedTypes = ('gecko', 'chrome', 'generic')
494 496
495 with addCommand(updateTranslationMaster, 'translate') as command: 497 with addCommand(updateTranslationMaster, 'translate') as command:
496 command.shortDescription = 'Updates translation master files' 498 command.shortDescription = 'Updates translation master files'
497 command.description = 'Updates the translation master files in the project o n crowdin.net.' 499 command.description = 'Updates the translation master files in the project o n crowdin.net.'
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 if option in ('-h', '--help'): 606 if option in ('-h', '--help'):
605 usage(scriptName, type, command) 607 usage(scriptName, type, command)
606 sys.exit() 608 sys.exit()
607 commands[command](baseDir, scriptName, opts, args, type) 609 commands[command](baseDir, scriptName, opts, args, type)
608 else: 610 else:
609 print 'Command %s is not supported for this application type' % comm and 611 print 'Command %s is not supported for this application type' % comm and
610 usage(scriptName, type) 612 usage(scriptName, type)
611 else: 613 else:
612 print 'Command %s is unrecognized' % command 614 print 'Command %s is unrecognized' % command
613 usage(scriptName, type) 615 usage(scriptName, type)
OLDNEW
« no previous file with comments | « no previous file | packagerEdge.py » ('j') | packagerEdge.py » ('J')

Powered by Google App Engine
This is Rietveld