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

Delta Between Two Patch Sets: build.py

Issue 29527695: Issue 5577 - allow non-numerical build-nums for gecko-webext (Closed)
Left Patch Set: Created Aug. 25, 2017, 12:33 p.m.
Right Patch Set: Created Aug. 25, 2017, 1:07 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 no_gecko_build = type not in {'gecko', 'gecko-webext'} 185 no_gecko_build = type not in {'gecko', 'gecko-webext'}
kzar 2017/08/29 13:17:45 How about this? (untested) if not (type.startswit
186 if no_gecko_build and not kwargs['buildNum'].isdigit(): 186 if no_gecko_build and not kwargs['buildNum'].isdigit():
187 raise TypeError('Build number must be numerical') 187 raise TypeError('Build number must be numerical')
188 elif option in {'-k', '--key'}: 188 elif option in {'-k', '--key'}:
189 kwargs['keyFile'] = value 189 kwargs['keyFile'] = value
190 elif option in {'-m', '--multi-compartment'} and type == 'gecko': 190 elif option in {'-m', '--multi-compartment'} and type == 'gecko':
191 kwargs['multicompartment'] = True 191 kwargs['multicompartment'] = True
192 elif option in {'-r', '--release'}: 192 elif option in {'-r', '--release'}:
193 kwargs['releaseBuild'] = True 193 kwargs['releaseBuild'] = True
194 if len(args) > 0: 194 if len(args) > 0:
195 kwargs['outFile'] = args[0] 195 kwargs['outFile'] = args[0]
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 if option in ('-h', '--help'): 599 if option in ('-h', '--help'):
600 usage(scriptName, type, command) 600 usage(scriptName, type, command)
601 sys.exit() 601 sys.exit()
602 commands[command](baseDir, scriptName, opts, args, type) 602 commands[command](baseDir, scriptName, opts, args, type)
603 else: 603 else:
604 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
605 usage(scriptName, type) 605 usage(scriptName, type)
606 else: 606 else:
607 print 'Command %s is unrecognized' % command 607 print 'Command %s is unrecognized' % command
608 usage(scriptName, type) 608 usage(scriptName, type)
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld