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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 'mtime': os.path.getmtime(os.path.join(baseDir, packageFile)), | 355 'mtime': os.path.getmtime(os.path.join(baseDir, packageFile)), |
356 'size': os.path.getsize(os.path.join(baseDir, packageFile)) | 356 'size': os.path.getsize(os.path.join(baseDir, packageFile)) |
357 } | 357 } |
358 if os.path.exists(os.path.join(baseDir, changelogFile)): | 358 if os.path.exists(os.path.join(baseDir, changelogFile)): |
359 link['changelog'] = changelogFile | 359 link['changelog'] = changelogFile |
360 links.append(link) | 360 links.append(link) |
361 template = get_template(get_config().get('extensions', 'nightlyIndexPage')) | 361 template = get_template(get_config().get('extensions', 'nightlyIndexPage')) |
362 template.stream({'config': self.config, 'links': links}).dump(outputPath) | 362 template.stream({'config': self.config, 'links': links}).dump(outputPath) |
363 | 363 |
364 def updateDocs(self): | 364 def updateDocs(self): |
365 if not self.config.type == 'gecko': | 365 if self.config.type not in ('gecko', 'chrome'): |
366 return | 366 return |
367 | 367 |
368 import buildtools.build as build | 368 import buildtools.build as build |
369 outputPath = os.path.join(self.config.docsDirectory, self.basename) | 369 outputPath = os.path.join(self.config.docsDirectory, self.basename) |
370 build.generateDocs(self.tempdir, None, [('--quiet', '')], [outputPath], self
.config.type) | 370 build.generateDocs(self.tempdir, None, [('--quiet', '')], [outputPath], self
.config.type) |
371 | 371 |
372 def uploadToChromeWebStore(self): | 372 def uploadToChromeWebStore(self): |
373 # Google APIs use HTTP error codes with error message in body. So we add | 373 # Google APIs use HTTP error codes with error message in body. So we add |
374 # the response body to the HTTPError to get more meaningful error messages. | 374 # the response body to the HTTPError to get more meaningful error messages. |
375 | 375 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 except Exception, ex: | 510 except Exception, ex: |
511 print >>sys.stderr, "The build for %s failed:" % repo | 511 print >>sys.stderr, "The build for %s failed:" % repo |
512 traceback.print_exc() | 512 traceback.print_exc() |
513 | 513 |
514 file = open(nightlyConfigFile, 'wb') | 514 file = open(nightlyConfigFile, 'wb') |
515 nightlyConfig.write(file) | 515 nightlyConfig.write(file) |
516 | 516 |
517 | 517 |
518 if __name__ == '__main__': | 518 if __name__ == '__main__': |
519 main() | 519 main() |
OLD | NEW |