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

Side by Side Diff: sitescripts/extensions/bin/createNightlies.py

Issue 29349846: Issue 4337 - Don't use -k command line switch when creating Firefox builds (Closed)
Patch Set: Created Aug. 16, 2016, 10:02 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 | 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 file is part of the Adblock Plus web scripts, 1 # This file is part of the Adblock Plus web scripts,
2 # Copyright (C) 2006-2016 Eyeo GmbH 2 # Copyright (C) 2006-2016 Eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 # clear broken output if any 311 # clear broken output if any
312 if os.path.exists(self.path): 312 if os.path.exists(self.path):
313 os.remove(self.path) 313 os.remove(self.path)
314 raise 314 raise
315 else: 315 else:
316 env = os.environ 316 env = os.environ
317 spiderMonkeyBinary = self.config.spiderMonkeyBinary 317 spiderMonkeyBinary = self.config.spiderMonkeyBinary
318 if spiderMonkeyBinary: 318 if spiderMonkeyBinary:
319 env = dict(env, SPIDERMONKEY_BINARY=spiderMonkeyBinary) 319 env = dict(env, SPIDERMONKEY_BINARY=spiderMonkeyBinary)
320 320
321 buildCommand = [ 321 if self.config.type == "gecko":
322 os.path.join(self.tempdir, 'build.py'), '-t', self.config.type, 322 key_params = []
323 'build', '-b', self.buildNum, '-k', self.config.keyFile, 323 else:
324 self.path 324 key_params = ['-k', self.config.keyFile]
325 ] 325
326 buildCommand = ([os.path.join(self.tempdir, 'build.py'),
Sebastian Noack 2016/08/16 12:27:54 I think it's a little simpler and more readable if
Wladimir Palant 2016/08/16 13:33:09 Done.
327 '-t', self.config.type, 'build', '-b', self.buildNum] +
328 key_params + [self.path])
326 subprocess.check_call(buildCommand, env=env) 329 subprocess.check_call(buildCommand, env=env)
327 330
328 if not os.path.exists(self.path): 331 if not os.path.exists(self.path):
329 raise Exception("Build failed, output file hasn't been created") 332 raise Exception("Build failed, output file hasn't been created")
330 333
331 linkPath = os.path.join(baseDir, '00latest%s' % self.config.packageSuffi x) 334 linkPath = os.path.join(baseDir, '00latest%s' % self.config.packageSuffi x)
332 if hasattr(os, 'symlink'): 335 if hasattr(os, 'symlink'):
333 if os.path.exists(linkPath): 336 if os.path.exists(linkPath):
334 os.remove(linkPath) 337 os.remove(linkPath)
335 os.symlink(os.path.basename(self.path), linkPath) 338 os.symlink(os.path.basename(self.path), linkPath)
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 except Exception, ex: 633 except Exception, ex:
631 logging.error('The build for %s failed:', repo) 634 logging.error('The build for %s failed:', repo)
632 logging.exception(ex) 635 logging.exception(ex)
633 636
634 file = open(nightlyConfigFile, 'wb') 637 file = open(nightlyConfigFile, 'wb')
635 nightlyConfig.write(file) 638 nightlyConfig.write(file)
636 639
637 640
638 if __name__ == '__main__': 641 if __name__ == '__main__':
639 main() 642 main()
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