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

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

Issue 6627397512200192: Issue 1362 - createNightlies script should call ensure_dependencies (Closed)
Patch Set: Use set literals Created Sept. 18, 2014, 6:17 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 | no next file » | 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-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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 def copyRepository(self): 87 def copyRepository(self):
88 ''' 88 '''
89 Create a repository copy in a temporary directory 89 Create a repository copy in a temporary directory
90 ''' 90 '''
91 # We cannot use hg archive here due to 91 # We cannot use hg archive here due to
92 # http://bz.selenic.com/show_bug.cgi?id=3747, have to clone properly :-( 92 # http://bz.selenic.com/show_bug.cgi?id=3747, have to clone properly :-(
93 self.tempdir = tempfile.mkdtemp(prefix=self.config.repositoryName) 93 self.tempdir = tempfile.mkdtemp(prefix=self.config.repositoryName)
94 command = ['hg', 'clone', '-q', self.config.repository, '-u', 'default', sel f.tempdir] 94 command = ['hg', 'clone', '-q', self.config.repository, '-u', 'default', sel f.tempdir]
95 subprocess.check_call(command) 95 subprocess.check_call(command)
96 96
97 # Make sure to process the dependencies file if it is present
98 import logging
99 logging.disable(logging.WARNING)
100 try:
101 from buildtools.ensure_dependencies import resolve_deps
102 resolve_deps(self.tempdir, self_update=False,
103 overrideroots={"hg": os.path.dirname(self.config.repository)},
104 skipdependencies={"buildtools"})
105 finally:
106 logging.disable(logging.NOTSET)
107
97 def writeChangelog(self, changes): 108 def writeChangelog(self, changes):
98 """ 109 """
99 write the changelog file into the cloned repository 110 write the changelog file into the cloned repository
100 """ 111 """
101 baseDir = os.path.join(self.config.nightliesDirectory, self.basename) 112 baseDir = os.path.join(self.config.nightliesDirectory, self.basename)
102 if not os.path.exists(baseDir): 113 if not os.path.exists(baseDir):
103 os.makedirs(baseDir) 114 os.makedirs(baseDir)
104 changelogFile = "%s-%s.changelog.xhtml" % (self.basename, self.version) 115 changelogFile = "%s-%s.changelog.xhtml" % (self.basename, self.version)
105 changelogPath = os.path.join(baseDir, changelogFile) 116 changelogPath = os.path.join(baseDir, changelogFile)
106 self.changelogURL = urlparse.urljoin(self.config.nightliesURL, self.basename + '/' + changelogFile) 117 self.changelogURL = urlparse.urljoin(self.config.nightliesURL, self.basename + '/' + changelogFile)
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 except Exception, ex: 505 except Exception, ex:
495 print >>sys.stderr, "The build for %s failed:" % repo 506 print >>sys.stderr, "The build for %s failed:" % repo
496 traceback.print_exc() 507 traceback.print_exc()
497 508
498 file = open(nightlyConfigFile, 'wb') 509 file = open(nightlyConfigFile, 'wb')
499 nightlyConfig.write(file) 510 nightlyConfig.write(file)
500 511
501 512
502 if __name__ == '__main__': 513 if __name__ == '__main__':
503 main() 514 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld