 Issue 29349846:
  Issue 4337 - Don't use -k command line switch when creating Firefox builds  (Closed)
    
  
    Issue 29349846:
  Issue 4337 - Don't use -k command line switch when creating Firefox builds  (Closed) 
  | Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| 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 Loading... | |
| 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 buildCommand = [os.path.join(self.tempdir, 'build.py'), | 
| 
Sebastian Noack
2016/08/16 16:06:57
Nit: Is this variable also used somewhere else? Ot
 
Wladimir Palant
2016/08/17 10:13:53
Done.
 | |
| 322 os.path.join(self.tempdir, 'build.py'), '-t', self.config.type, | 322 '-t', self.config.type, 'build', '-b', self.buildNum] | 
| 323 'build', '-b', self.buildNum, '-k', self.config.keyFile, | 323 if self.config.type != "gecko": | 
| 
Sebastian Noack
2016/08/16 16:06:57
Nit: As per our coding style guide, and already do
 
Wladimir Palant
2016/08/17 10:13:53
Done.
 | |
| 324 self.path | 324 buildCommand.extend(['-k', self.config.keyFile]) | 
| 325 ] | 325 buildCommand.append(self.path) | 
| 326 subprocess.check_call(buildCommand, env=env) | 326 subprocess.check_call(buildCommand, env=env) | 
| 327 | 327 | 
| 328 if not os.path.exists(self.path): | 328 if not os.path.exists(self.path): | 
| 329 raise Exception("Build failed, output file hasn't been created") | 329 raise Exception("Build failed, output file hasn't been created") | 
| 330 | 330 | 
| 331 linkPath = os.path.join(baseDir, '00latest%s' % self.config.packageSuffi x) | 331 linkPath = os.path.join(baseDir, '00latest%s' % self.config.packageSuffi x) | 
| 332 if hasattr(os, 'symlink'): | 332 if hasattr(os, 'symlink'): | 
| 333 if os.path.exists(linkPath): | 333 if os.path.exists(linkPath): | 
| 334 os.remove(linkPath) | 334 os.remove(linkPath) | 
| 335 os.symlink(os.path.basename(self.path), linkPath) | 335 os.symlink(os.path.basename(self.path), linkPath) | 
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 630 except Exception, ex: | 630 except Exception, ex: | 
| 631 logging.error('The build for %s failed:', repo) | 631 logging.error('The build for %s failed:', repo) | 
| 632 logging.exception(ex) | 632 logging.exception(ex) | 
| 633 | 633 | 
| 634 file = open(nightlyConfigFile, 'wb') | 634 file = open(nightlyConfigFile, 'wb') | 
| 635 nightlyConfig.write(file) | 635 nightlyConfig.write(file) | 
| 636 | 636 | 
| 637 | 637 | 
| 638 if __name__ == '__main__': | 638 if __name__ == '__main__': | 
| 639 main() | 639 main() | 
| OLD | NEW |