OLD | NEW |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This file is part of the Adblock Plus web scripts, | 3 # This file is part of the Adblock Plus web scripts, |
4 # Copyright (C) 2006-2015 Eyeo GmbH | 4 # Copyright (C) 2006-2015 Eyeo GmbH |
5 # | 5 # |
6 # Adblock Plus is free software: you can redistribute it and/or modify | 6 # Adblock Plus is free software: you can redistribute it and/or modify |
7 # it under the terms of the GNU General Public License version 3 as | 7 # it under the terms of the GNU General Public License version 3 as |
8 # published by the Free Software Foundation. | 8 # published by the Free Software Foundation. |
9 # | 9 # |
10 # Adblock Plus is distributed in the hope that it will be useful, | 10 # Adblock Plus is distributed in the hope that it will be useful, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 self.tempdir = tempfile.mkdtemp(prefix=self.config.repositoryName) | 95 self.tempdir = tempfile.mkdtemp(prefix=self.config.repositoryName) |
96 command = ['hg', 'clone', '-q', self.config.repository, '-u', 'default', sel
f.tempdir] | 96 command = ['hg', 'clone', '-q', self.config.repository, '-u', 'default', sel
f.tempdir] |
97 subprocess.check_call(command) | 97 subprocess.check_call(command) |
98 | 98 |
99 # Make sure to process the dependencies file if it is present | 99 # Make sure to process the dependencies file if it is present |
100 import logging | 100 import logging |
101 logging.disable(logging.WARNING) | 101 logging.disable(logging.WARNING) |
102 try: | 102 try: |
103 from buildtools.ensure_dependencies import resolve_deps | 103 from buildtools.ensure_dependencies import resolve_deps |
104 resolve_deps(self.tempdir, self_update=False, | 104 resolve_deps(self.tempdir, self_update=False, |
105 overrideroots={"hg": os.path.dirname(self.config.repository)}, | 105 overrideroots={"hg": os.path.abspath(os.path.join(self.config.reposito
ry, os.pardir))}, |
106 skipdependencies={"buildtools"}) | 106 skipdependencies={"buildtools"}) |
107 finally: | 107 finally: |
108 logging.disable(logging.NOTSET) | 108 logging.disable(logging.NOTSET) |
109 | 109 |
110 def writeChangelog(self, changes): | 110 def writeChangelog(self, changes): |
111 """ | 111 """ |
112 write the changelog file into the cloned repository | 112 write the changelog file into the cloned repository |
113 """ | 113 """ |
114 baseDir = os.path.join(self.config.nightliesDirectory, self.basename) | 114 baseDir = os.path.join(self.config.nightliesDirectory, self.basename) |
115 if not os.path.exists(baseDir): | 115 if not os.path.exists(baseDir): |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 except Exception, ex: | 517 except Exception, ex: |
518 print >>sys.stderr, "The build for %s failed:" % repo | 518 print >>sys.stderr, "The build for %s failed:" % repo |
519 traceback.print_exc() | 519 traceback.print_exc() |
520 | 520 |
521 file = open(nightlyConfigFile, 'wb') | 521 file = open(nightlyConfigFile, 'wb') |
522 nightlyConfig.write(file) | 522 nightlyConfig.write(file) |
523 | 523 |
524 | 524 |
525 if __name__ == '__main__': | 525 if __name__ == '__main__': |
526 main() | 526 main() |
OLD | NEW |