Fix automatic version update.

This fixes two things:
1. Guarantee that versions are bumped up also when presubmit errors exists. Those errors originate from other CLs and should not stop the automatic versioning.
2. Calculate the last bleeding edge version when pushing to trunk based on remote branch svn/bleeding_edge and not on local branch master. The master branch is not kept up-to-date by the script.

BUG=
TBR=jarin@chromium.org

Review URL: https://codereview.chromium.org/404093002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6d3fc8a3
......@@ -199,7 +199,8 @@ class ChangeVersion(Step):
self.GitCommit("[Auto-roll] Bump up version to %s\n\nTBR=%s" %
(self["new_version"], self._options.author))
self.GitUpload(author=self._options.author,
force=self._options.force_upload)
force=self._options.force_upload,
bypass_hooks=True)
self.GitDCommit()
print "Successfully changed the version."
finally:
......
......@@ -147,7 +147,8 @@ class GitRecipesMixin(object):
args.append(Quoted(patch_file))
self.Git(MakeArgs(args))
def GitUpload(self, reviewer="", author="", force=False, cq=False):
def GitUpload(self, reviewer="", author="", force=False, cq=False,
bypass_hooks=False):
args = ["cl upload --send-mail"]
if author:
args += ["--email", Quoted(author)]
......@@ -157,6 +158,8 @@ class GitRecipesMixin(object):
args.append("-f")
if cq:
args.append("--use-commit-queue")
if bypass_hooks:
args.append("--bypass-hooks")
# TODO(machenbach): Check output in forced mode. Verify that all required
# base files were uploaded, if not retry.
self.Git(MakeArgs(args), pipe=False)
......
......@@ -130,7 +130,7 @@ class GetCurrentBleedingEdgeVersion(Step):
MESSAGE = "Get latest bleeding edge version."
def RunStep(self):
self.GitCheckoutFile(self.Config(VERSION_FILE), "master")
self.GitCheckoutFile(self.Config(VERSION_FILE), "svn/bleeding_edge")
# Store latest version.
self.ReadAndPersistVersion("latest_")
......
......@@ -755,8 +755,8 @@ Performance and stability improvements on all platforms.""", commit)
Git("log -1 --format=%s hash2",
"Version 3.4.5 (based on bleeding_edge revision r1234)\n"),
Git("svn find-rev r1234", "hash3\n"),
Git("checkout -f master -- %s" % TEST_CONFIG[VERSION_FILE], "",
cb=self.WriteFakeVersionFile),
Git("checkout -f svn/bleeding_edge -- %s" % TEST_CONFIG[VERSION_FILE],
"", cb=self.WriteFakeVersionFile),
Git("checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "",
cb=self.WriteFakeVersionFile),
Git("log --format=%H hash3..push_hash", "rev1\n"),
......@@ -1312,7 +1312,8 @@ LOG=N
cb=ResetVersion(11, 4)),
Git("commit -am \"[Auto-roll] Bump up version to 3.11.6.0\n\n"
"TBR=author@chromium.org\"", ""),
Git("cl upload --send-mail --email \"author@chromium.org\" -f", ""),
Git("cl upload --send-mail --email \"author@chromium.org\" -f "
"--bypass-hooks", ""),
Git("cl dcommit -f --bypass-hooks", ""),
Git("checkout -f bleeding_edge", ""),
Git("branch", "auto-bump-up-version\n* bleeding_edge"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment