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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 """ | 262 """ |
263 baseDir = os.path.join(self.config.nightliesDirectory, self.basename) | 263 baseDir = os.path.join(self.config.nightliesDirectory, self.basename) |
264 if self.config.type == 'safari': | 264 if self.config.type == 'safari': |
265 manifestPath = os.path.join(baseDir, 'updates.plist') | 265 manifestPath = os.path.join(baseDir, 'updates.plist') |
266 templateName = 'safariUpdateManifest' | 266 templateName = 'safariUpdateManifest' |
267 autoescape = True | 267 autoescape = True |
268 elif self.config.type == 'android': | 268 elif self.config.type == 'android': |
269 manifestPath = os.path.join(baseDir, 'updates.xml') | 269 manifestPath = os.path.join(baseDir, 'updates.xml') |
270 templateName = 'androidUpdateManifest' | 270 templateName = 'androidUpdateManifest' |
271 autoescape = True | 271 autoescape = True |
272 elif self.config.type == 'gecko-webext': | |
273 manifestPath = os.path.join(baseDir, 'updates.json') | |
274 templateName = 'geckoUpdateManifest' | |
275 autoescape = False | |
276 else: | 272 else: |
277 return | 273 return |
278 | 274 |
279 if not os.path.exists(baseDir): | 275 if not os.path.exists(baseDir): |
280 os.makedirs(baseDir) | 276 os.makedirs(baseDir) |
281 | 277 |
282 # ABP for Android used to have its own update manifest format. We need t
o | 278 # ABP for Android used to have its own update manifest format. We need t
o |
283 # generate both that and the new one in the libadblockplus format as lon
g | 279 # generate both that and the new one in the libadblockplus format as lon
g |
284 # as a significant amount of users is on an old version. | 280 # as a significant amount of users is on an old version. |
285 if self.config.type == 'android': | 281 if self.config.type == 'android': |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 else: | 671 else: |
676 raise Exception('Unknown build type {}' % self.config.type) | 672 raise Exception('Unknown build type {}' % self.config.type) |
677 | 673 |
678 # create development build | 674 # create development build |
679 self.build() | 675 self.build() |
680 | 676 |
681 # write out changelog | 677 # write out changelog |
682 self.writeChangelog(self.getChanges()) | 678 self.writeChangelog(self.getChanges()) |
683 | 679 |
684 # write update manifest | 680 # write update manifest |
685 if self.config.type != 'gecko': | 681 self.writeUpdateManifest() |
686 self.writeUpdateManifest() | |
687 | 682 |
688 # retire old builds | 683 # retire old builds |
689 versions = self.retireBuilds() | 684 versions = self.retireBuilds() |
690 | 685 |
691 if self.config.type == 'ie': | 686 if self.config.type == 'ie': |
692 self.writeIEUpdateManifest(versions) | 687 self.writeIEUpdateManifest(versions) |
693 | 688 |
694 # update index page | 689 # update index page |
695 self.updateIndex(versions) | 690 self.updateIndex(versions) |
696 | 691 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 except Exception as ex: | 728 except Exception as ex: |
734 logging.error('The build for %s failed:', repo) | 729 logging.error('The build for %s failed:', repo) |
735 logging.exception(ex) | 730 logging.exception(ex) |
736 | 731 |
737 file = open(nightlyConfigFile, 'wb') | 732 file = open(nightlyConfigFile, 'wb') |
738 nightlyConfig.write(file) | 733 nightlyConfig.write(file) |
739 | 734 |
740 | 735 |
741 if __name__ == '__main__': | 736 if __name__ == '__main__': |
742 main() | 737 main() |
OLD | NEW |