| 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-present eyeo GmbH | 2 # Copyright (C) 2006-present 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 'defaults.id=', self.config.repository | 98 'defaults.id=', self.config.repository |
| 99 ] | 99 ] |
| 100 return subprocess.check_output(command).strip() | 100 return subprocess.check_output(command).strip() |
| 101 | 101 |
| 102 def getCurrentBuild(self): | 102 def getCurrentBuild(self): |
| 103 """ | 103 """ |
| 104 calculates the (typically numerical) build ID for the current build | 104 calculates the (typically numerical) build ID for the current build |
| 105 """ | 105 """ |
| 106 command = ['hg', 'id', '-n', '--config', 'defaults.id=', self.tempdir] | 106 command = ['hg', 'id', '-n', '--config', 'defaults.id=', self.tempdir] |
| 107 build = subprocess.check_output(command).strip() | 107 build = subprocess.check_output(command).strip() |
| 108 if self.config.type == 'gecko': | 108 if self.config.type in {'gecko', 'gecko-webext'}: |
| 109 build += '-beta' | 109 build += '-beta' |
| 110 return build | 110 return build |
| 111 | 111 |
| 112 def getChanges(self): | 112 def getChanges(self): |
| 113 """ | 113 """ |
| 114 retrieve changes between the current and previous ("first") revision | 114 retrieve changes between the current and previous ("first") revision |
| 115 """ | 115 """ |
| 116 command = [ | 116 command = [ |
| 117 'hg', 'log', '-R', self.tempdir, '-r', | 117 'hg', 'log', '-R', self.tempdir, '-r', |
| 118 'reverse(ancestors({}))'.format(self.config.revision), '-l', '50', | 118 'reverse(ancestors({}))'.format(self.config.revision), '-l', '50', |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 except Exception as ex: | 724 except Exception as ex: |
| 725 logging.error('The build for %s failed:', repo) | 725 logging.error('The build for %s failed:', repo) |
| 726 logging.exception(ex) | 726 logging.exception(ex) |
| 727 | 727 |
| 728 file = open(nightlyConfigFile, 'wb') | 728 file = open(nightlyConfigFile, 'wb') |
| 729 nightlyConfig.write(file) | 729 nightlyConfig.write(file) |
| 730 | 730 |
| 731 | 731 |
| 732 if __name__ == '__main__': | 732 if __name__ == '__main__': |
| 733 main() | 733 main() |
| OLD | NEW |