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-2014 Eyeo GmbH | 4 # Copyright (C) 2006-2014 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 request.add_data(file) | 411 request.add_data(file) |
412 | 412 |
413 response = json.load(urllib2.urlopen(request)) | 413 response = json.load(urllib2.urlopen(request)) |
414 | 414 |
415 if response['uploadState'] == 'FAILURE': | 415 if response['uploadState'] == 'FAILURE': |
416 raise Exception(response['itemError']) | 416 raise Exception(response['itemError']) |
417 | 417 |
418 # publish the new version on the Chrome Web Store | 418 # publish the new version on the Chrome Web Store |
419 # https://developer.chrome.com/webstore/using_webstore_api#publishpublic | 419 # https://developer.chrome.com/webstore/using_webstore_api#publishpublic |
420 | 420 |
421 request = urllib2.Request('https://www.googleapis.com/upload/chromewebstore/
v1.1/items/%s/publish' % self.config.devbuildGalleryID) | 421 request = urllib2.Request('https://www.googleapis.com/chromewebstore/v1.1/it
ems/%s/publish' % self.config.devbuildGalleryID) |
422 request.get_method = lambda: 'POST' | 422 request.get_method = lambda: 'POST' |
423 request.add_header('Authorization', auth_token) | 423 request.add_header('Authorization', auth_token) |
424 request.add_header('x-goog-api-version', '2') | 424 request.add_header('x-goog-api-version', '2') |
425 request.add_header('Content-Length', '0') | 425 request.add_header('Content-Length', '0') |
426 | 426 |
427 response = json.load(urllib2.urlopen(request)) | 427 response = json.load(urllib2.urlopen(request)) |
428 | 428 |
429 if any(status != 'ITEM_PENDING_REVIEW' for status in response['status']): | 429 if any(status != 'ITEM_PENDING_REVIEW' for status in response['status']): |
430 raise Exception(response['statusDetail']) | 430 raise Exception(response['statusDetail']) |
431 | 431 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 except Exception, ex: | 507 except Exception, ex: |
508 print >>sys.stderr, "The build for %s failed:" % repo | 508 print >>sys.stderr, "The build for %s failed:" % repo |
509 traceback.print_exc() | 509 traceback.print_exc() |
510 | 510 |
511 file = open(nightlyConfigFile, 'wb') | 511 file = open(nightlyConfigFile, 'wb') |
512 nightlyConfig.write(file) | 512 nightlyConfig.write(file) |
513 | 513 |
514 | 514 |
515 if __name__ == '__main__': | 515 if __name__ == '__main__': |
516 main() | 516 main() |
OLD | NEW |