| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 the V8 project authors. All rights reserved. | 2 # Copyright 2015 the V8 project authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 import tempfile | 9 import tempfile |
| 10 import urllib2 | 10 import urllib2 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 n=1, format="%H", | 233 n=1, format="%H", |
| 234 grep=self["commit_title"], | 234 grep=self["commit_title"], |
| 235 branch="origin/%s" % self["version"], | 235 branch="origin/%s" % self["version"], |
| 236 ) | 236 ) |
| 237 except GitFailedException: | 237 except GitFailedException: |
| 238 # In the normal case, the remote doesn't exist yet and git will fail. | 238 # In the normal case, the remote doesn't exist yet and git will fail. |
| 239 pass | 239 pass |
| 240 if commit: | 240 if commit: |
| 241 print "Found %s. Trying to repair tag and bail out." % self["version"] | 241 print "Found %s. Trying to repair tag and bail out." % self["version"] |
| 242 self.Git("tag %s %s" % (self["version"], commit)) | 242 self.Git("tag %s %s" % (self["version"], commit)) |
| 243 self.Git("push origin %s" % self["version"]) | 243 self.Git("push origin refs/tags/%s" % self["version"]) |
| 244 return True | 244 return True |
| 245 | 245 |
| 246 | 246 |
| 247 class PushBranch(Step): | 247 class PushBranch(Step): |
| 248 MESSAGE = "Push changes." | 248 MESSAGE = "Push changes." |
| 249 | 249 |
| 250 def RunStep(self): | 250 def RunStep(self): |
| 251 pushspecs = [ | 251 pushspecs = [ |
| 252 "refs/heads/work-branch:refs/pending/heads/%s" % self["version"], | 252 "refs/heads/work-branch:refs/pending/heads/%s" % self["version"], |
| 253 "%s:refs/pending-tags/heads/%s" % (self["push_hash"], self["version"]), | 253 "%s:refs/pending-tags/heads/%s" % (self["push_hash"], self["version"]), |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 CommitBranch, | 326 CommitBranch, |
| 327 FixBrokenTag, | 327 FixBrokenTag, |
| 328 PushBranch, | 328 PushBranch, |
| 329 TagRevision, | 329 TagRevision, |
| 330 CleanUp, | 330 CleanUp, |
| 331 ] | 331 ] |
| 332 | 332 |
| 333 | 333 |
| 334 if __name__ == "__main__": # pragma: no cover | 334 if __name__ == "__main__": # pragma: no cover |
| 335 sys.exit(CreateRelease().Run()) | 335 sys.exit(CreateRelease().Run()) |
| OLD | NEW |