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

Side by Side Diff: build.py

Issue 29345505: Issue 4099 - Don't enforce Gecko build IDs to be numerical (Closed)
Patch Set: Created June 1, 2016, 2:31 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 def runBuild(baseDir, scriptName, opts, args, type): 178 def runBuild(baseDir, scriptName, opts, args, type):
179 locales = None 179 locales = None
180 buildNum = None 180 buildNum = None
181 multicompartment = False 181 multicompartment = False
182 releaseBuild = False 182 releaseBuild = False
183 keyFile = None 183 keyFile = None
184 for option, value in opts: 184 for option, value in opts:
185 if option in ('-l', '--locales'): 185 if option in ('-l', '--locales'):
186 locales = value.split(',') 186 locales = value.split(',')
187 elif option in ('-b', '--build'): 187 elif option in ('-b', '--build'):
188 buildNum = int(value) 188 buildNum = value
Vasily Kuznetsov 2016/06/01 16:08:53 So now that `buildNum` is a string maybe we can al
Wladimir Palant 2016/06/01 17:16:42 Right, I don't think anything is still passing in
189 if type != 'gecko' and not re.search(r'^\d+$', buildNum):
190 raise TypeError('Build number must be numerical')
189 elif option in ('-k', '--key'): 191 elif option in ('-k', '--key'):
190 keyFile = value 192 keyFile = value
191 elif option in ('-m', '--multi-compartment'): 193 elif option in ('-m', '--multi-compartment'):
192 multicompartment = True 194 multicompartment = True
193 elif option in ('-r', '--release'): 195 elif option in ('-r', '--release'):
194 releaseBuild = True 196 releaseBuild = True
195 outFile = args[0] if len(args) > 0 else None 197 outFile = args[0] if len(args) > 0 else None
196 198
197 if type == 'gecko': 199 if type == 'gecko':
198 import buildtools.packagerGecko as packager 200 import buildtools.packagerGecko as packager
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 if option in ('-h', '--help'): 610 if option in ('-h', '--help'):
609 usage(scriptName, type, command) 611 usage(scriptName, type, command)
610 sys.exit() 612 sys.exit()
611 commands[command](baseDir, scriptName, opts, args, type) 613 commands[command](baseDir, scriptName, opts, args, type)
612 else: 614 else:
613 print 'Command %s is not supported for this application type' % comm and 615 print 'Command %s is not supported for this application type' % comm and
614 usage(scriptName, type) 616 usage(scriptName, type)
615 else: 617 else:
616 print 'Command %s is unrecognized' % command 618 print 'Command %s is unrecognized' % command
617 usage(scriptName, type) 619 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