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

Side by Side Diff: build.py

Issue 29527695: Issue 5577 - allow non-numerical build-nums for gecko-webext (Closed)
Patch Set: Created Aug. 25, 2017, 12:33 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 | no next file » | no next file with comments »
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 175 }
176 176
177 177
178 def runBuild(baseDir, scriptName, opts, args, type): 178 def runBuild(baseDir, scriptName, opts, args, type):
179 kwargs = {} 179 kwargs = {}
180 for option, value in opts: 180 for option, value in opts:
181 if option in {'-l', '--locales'} and type == 'gecko': 181 if option in {'-l', '--locales'} and type == 'gecko':
182 kwargs['locales'] = value.split(',') 182 kwargs['locales'] = value.split(',')
183 elif option in {'-b', '--build'}: 183 elif option in {'-b', '--build'}:
184 kwargs['buildNum'] = value 184 kwargs['buildNum'] = value
185 if type not in {'gecko', 'gecko-webext'} and not kwargs['buildNum']. isdigit(): 185 no_gecko_build = type not in {'gecko', 'gecko-webext'}
Sebastian Noack 2017/08/25 12:54:17 This line doesn't exist in the version in the mast
tlucas 2017/08/25 13:07:49 Done.
186 if no_gecko_build and not kwargs['buildNum'].isdigit():
186 raise TypeError('Build number must be numerical') 187 raise TypeError('Build number must be numerical')
187 elif option in {'-k', '--key'}: 188 elif option in {'-k', '--key'}:
188 kwargs['keyFile'] = value 189 kwargs['keyFile'] = value
189 elif option in {'-m', '--multi-compartment'} and type == 'gecko': 190 elif option in {'-m', '--multi-compartment'} and type == 'gecko':
190 kwargs['multicompartment'] = True 191 kwargs['multicompartment'] = True
191 elif option in {'-r', '--release'}: 192 elif option in {'-r', '--release'}:
192 kwargs['releaseBuild'] = True 193 kwargs['releaseBuild'] = True
193 if len(args) > 0: 194 if len(args) > 0:
194 kwargs['outFile'] = args[0] 195 kwargs['outFile'] = args[0]
195 196
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 if option in ('-h', '--help'): 599 if option in ('-h', '--help'):
599 usage(scriptName, type, command) 600 usage(scriptName, type, command)
600 sys.exit() 601 sys.exit()
601 commands[command](baseDir, scriptName, opts, args, type) 602 commands[command](baseDir, scriptName, opts, args, type)
602 else: 603 else:
603 print 'Command %s is not supported for this application type' % comm and 604 print 'Command %s is not supported for this application type' % comm and
604 usage(scriptName, type) 605 usage(scriptName, type)
605 else: 606 else:
606 print 'Command %s is unrecognized' % command 607 print 'Command %s is unrecognized' % command
607 usage(scriptName, type) 608 usage(scriptName, type)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld