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

Side by Side Diff: build.py

Issue 29334723: Issue 3404 - Add platform name to devenv path (Closed)
Patch Set: Concatinate the strings Created Jan. 27, 2016, 2:19 p.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 | packager.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 os, sys, re, subprocess, shutil, buildtools 7 import os, sys, re, subprocess, shutil, buildtools
8 from getopt import getopt, GetoptError 8 from getopt import getopt, GetoptError
9 from StringIO import StringIO 9 from StringIO import StringIO
10 from zipfile import ZipFile 10 from zipfile import ZipFile
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 def createDevEnv(baseDir, scriptName, opts, args, type): 220 def createDevEnv(baseDir, scriptName, opts, args, type):
221 if type == 'safari': 221 if type == 'safari':
222 import buildtools.packagerSafari as packager 222 import buildtools.packagerSafari as packager
223 else: 223 else:
224 import buildtools.packagerChrome as packager 224 import buildtools.packagerChrome as packager
225 225
226 file = StringIO() 226 file = StringIO()
227 packager.createBuild(baseDir, type=type, outFile=file, devenv=True, releaseBui ld=True) 227 packager.createBuild(baseDir, type=type, outFile=file, devenv=True, releaseBui ld=True)
228 228
229 from buildtools.packager import getDevEnvPath 229 from buildtools.packager import getDevEnvPath
230 devenv_dir = getDevEnvPath(baseDir) 230 devenv_dir = getDevEnvPath(baseDir, type)
231 231
232 shutil.rmtree(devenv_dir, ignore_errors=True) 232 shutil.rmtree(devenv_dir, ignore_errors=True)
233 233
234 file.seek(0) 234 file.seek(0)
235 with ZipFile(file, 'r') as zip_file: 235 with ZipFile(file, 'r') as zip_file:
236 zip_file.extractall(devenv_dir) 236 zip_file.extractall(devenv_dir)
237 237
238 238
239 def setupTranslations(baseDir, scriptName, opts, args, type): 239 def setupTranslations(baseDir, scriptName, opts, args, type):
240 if len(args) < 1: 240 if len(args) < 1:
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 if option in ('-h', '--help'): 571 if option in ('-h', '--help'):
572 usage(scriptName, type, command) 572 usage(scriptName, type, command)
573 sys.exit() 573 sys.exit()
574 commands[command](baseDir, scriptName, opts, args, type) 574 commands[command](baseDir, scriptName, opts, args, type)
575 else: 575 else:
576 print 'Command %s is not supported for this application type' % command 576 print 'Command %s is not supported for this application type' % command
577 usage(scriptName, type) 577 usage(scriptName, type)
578 else: 578 else:
579 print 'Command %s is unrecognized' % command 579 print 'Command %s is unrecognized' % command
580 usage(scriptName, type) 580 usage(scriptName, type)
OLDNEW
« no previous file with comments | « no previous file | packager.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld