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

Side by Side Diff: sitescripts/extensions/bin/createNightlies.py

Issue 29337988: Issue 382 - Removed support for Chrome devbuilds using the experimental API (Closed)
Patch Set: Created March 8, 2016, 5:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sitescripts/extensions/template/nightlies.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2016 Eyeo GmbH 4 # Copyright (C) 2006-2016 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 publicKey = packager.getPublicKey(self.config.keyFile) 194 publicKey = packager.getPublicKey(self.config.keyFile)
195 hash = hashlib.sha256() 195 hash = hashlib.sha256()
196 hash.update(publicKey) 196 hash.update(publicKey)
197 self.extensionID = hash.hexdigest()[0:32] 197 self.extensionID = hash.hexdigest()[0:32]
198 self.extensionID = ''.join(map(lambda c: chr(97 + int(c, 16)), self.extensio nID)) 198 self.extensionID = ''.join(map(lambda c: chr(97 + int(c, 16)), self.extensio nID))
199 199
200 # Now read metadata file 200 # Now read metadata file
201 metadata = packager.readMetadata(self.tempdir, self.config.type) 201 metadata = packager.readMetadata(self.tempdir, self.config.type)
202 self.version = packager.getBuildVersion(self.tempdir, metadata, False, self. revision) 202 self.version = packager.getBuildVersion(self.tempdir, metadata, False, self. revision)
203 self.basename = metadata.get("general", "basename") 203 self.basename = metadata.get("general", "basename")
204 if self.config.experimental:
205 self.basename += '-experimental'
206 204
207 self.compat = [] 205 self.compat = []
208 if metadata.has_section('compat') and metadata.has_option('compat', 'chrome' ): 206 if metadata.has_section('compat') and metadata.has_option('compat', 'chrome' ):
209 self.compat.append({'id': 'chrome', 'minVersion': metadata.get('compat', ' chrome')}) 207 self.compat.append({'id': 'chrome', 'minVersion': metadata.get('compat', ' chrome')})
210 208
211 def readSafariMetadata(self): 209 def readSafariMetadata(self):
212 import buildtools.packagerSafari as packager 210 import buildtools.packagerSafari as packager
213 metadata = packager.readMetadata(self.tempdir, self.config.type) 211 metadata = packager.readMetadata(self.tempdir, self.config.type)
214 certs = packager.get_certificates_and_key(self.config.keyFile)[0] 212 certs = packager.get_certificates_and_key(self.config.keyFile)[0]
215 213
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 buildCommand = ['ssh', '-p', port, get_config().get('extensions', 'andro idBuildHost')] 300 buildCommand = ['ssh', '-p', port, get_config().get('extensions', 'andro idBuildHost')]
303 buildCommand.extend(map(pipes.quote, ['/home/android/bin/makedebugbuild. py', '--revision', self.revision, '--version', self.version, '--stdout'])) 301 buildCommand.extend(map(pipes.quote, ['/home/android/bin/makedebugbuild. py', '--revision', self.revision, '--version', self.version, '--stdout']))
304 subprocess.check_call(buildCommand, stdout=apkFile, close_fds=True) 302 subprocess.check_call(buildCommand, stdout=apkFile, close_fds=True)
305 except: 303 except:
306 # clear broken output if any 304 # clear broken output if any
307 if os.path.exists(self.path): 305 if os.path.exists(self.path):
308 os.remove(self.path) 306 os.remove(self.path)
309 raise 307 raise
310 elif self.config.type == 'chrome': 308 elif self.config.type == 'chrome':
311 import buildtools.packagerChrome as packager 309 import buildtools.packagerChrome as packager
312 packager.createBuild(self.tempdir, type=self.config.type, outFile=self.pat h, buildNum=self.revision, keyFile=self.config.keyFile, experimentalAPI=self.con fig.experimental) 310 packager.createBuild(self.tempdir, type=self.config.type, outFile=self.pat h, buildNum=self.revision, keyFile=self.config.keyFile)
313 elif self.config.type == 'safari': 311 elif self.config.type == 'safari':
314 import buildtools.packagerSafari as packager 312 import buildtools.packagerSafari as packager
315 packager.createBuild(self.tempdir, type=self.config.type, outFile=self.pat h, buildNum=self.revision, keyFile=self.config.keyFile) 313 packager.createBuild(self.tempdir, type=self.config.type, outFile=self.pat h, buildNum=self.revision, keyFile=self.config.keyFile)
316 else: 314 else:
317 import buildtools.packagerGecko as packager 315 import buildtools.packagerGecko as packager
318 packager.createBuild(self.tempdir, outFile=self.path, buildNum=self.revisi on, keyFile=self.config.keyFile) 316 packager.createBuild(self.tempdir, outFile=self.path, buildNum=self.revisi on, keyFile=self.config.keyFile)
319 317
320 if not os.path.exists(self.path): 318 if not os.path.exists(self.path):
321 raise Exception("Build failed, output file hasn't been created") 319 raise Exception("Build failed, output file hasn't been created")
322 320
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 except Exception, ex: 619 except Exception, ex:
622 logging.error("The build for %s failed:", repo) 620 logging.error("The build for %s failed:", repo)
623 logging.exception(ex) 621 logging.exception(ex)
624 622
625 file = open(nightlyConfigFile, 'wb') 623 file = open(nightlyConfigFile, 'wb')
626 nightlyConfig.write(file) 624 nightlyConfig.write(file)
627 625
628 626
629 if __name__ == '__main__': 627 if __name__ == '__main__':
630 main() 628 main()
OLDNEW
« no previous file with comments | « no previous file | sitescripts/extensions/template/nightlies.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld