Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: sitescripts/extensions/bin/createNightlies.py

Issue 6282207912001536: Issue 356 - Fixed URL for publishing an item on the Chrome Web Store (Closed)
Left Patch Set: Addressed comments Created May 6, 2014, 7:44 a.m.
Right Patch Set: Addressed comments Created May 6, 2014, 8:18 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 # https://developer.chrome.com/webstore/using_webstore_api#publishpublic 428 # https://developer.chrome.com/webstore/using_webstore_api#publishpublic
429 429
430 request = urllib2.Request('https://www.googleapis.com/chromewebstore/v1.1/it ems/%s/publish' % self.config.devbuildGalleryID) 430 request = urllib2.Request('https://www.googleapis.com/chromewebstore/v1.1/it ems/%s/publish' % self.config.devbuildGalleryID)
431 request.get_method = lambda: 'POST' 431 request.get_method = lambda: 'POST'
432 request.add_header('Authorization', auth_token) 432 request.add_header('Authorization', auth_token)
433 request.add_header('x-goog-api-version', '2') 433 request.add_header('x-goog-api-version', '2')
434 request.add_header('Content-Length', '0') 434 request.add_header('Content-Length', '0')
435 435
436 response = json.load(opener.open(request)) 436 response = json.load(opener.open(request))
437 437
438 if any(status not in ('OK', 'ITEM_PENDING_REVIEW') for status in response['s tatus']): 438 if any(status != 'ITEM_PENDING_REVIEW' for status in response['status']):
439 raise Exception(response['statusDetail']) 439 raise Exception({'status': response['status'], 'statusDetail': response['s tatusDetail']})
Wladimir Palant 2014/05/06 08:05:48 I don't know where you got the status code OK from
Sebastian Noack 2014/05/06 08:18:50 Done.
440 440
441 def run(self): 441 def run(self):
442 """ 442 """
443 Run the nightly build process for one extension 443 Run the nightly build process for one extension
444 """ 444 """
445 try: 445 try:
446 if self.config.type == 'ie': 446 if self.config.type == 'ie':
447 # We cannot build IE builds, simply list the builds already in 447 # We cannot build IE builds, simply list the builds already in
448 # the directory. Basename has to be deduced from the repository name. 448 # the directory. Basename has to be deduced from the repository name.
449 self.basename = os.path.basename(self.config.repository) 449 self.basename = os.path.basename(self.config.repository)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 except Exception, ex: 516 except Exception, ex:
517 print >>sys.stderr, "The build for %s failed:" % repo 517 print >>sys.stderr, "The build for %s failed:" % repo
518 traceback.print_exc() 518 traceback.print_exc()
519 519
520 file = open(nightlyConfigFile, 'wb') 520 file = open(nightlyConfigFile, 'wb')
521 nightlyConfig.write(file) 521 nightlyConfig.write(file)
522 522
523 523
524 if __name__ == '__main__': 524 if __name__ == '__main__':
525 main() 525 main()
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld