Commit ab8744d2 authored by machenbach's avatar machenbach Committed by Commit bot

Fix version and changelog pushing.

BUG=chromium:451357
LOG=n
TBR=tandrii@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26255}
parent bf41bde9
......@@ -285,6 +285,13 @@ class ApplyChanges(Step):
def RunStep(self):
self.ApplyPatch(self.Config("PATCH_FILE"))
os.remove(self.Config("PATCH_FILE"))
# The change log has been modified by the patch. Reset it to the version
# on trunk and apply the exact changes determined by this PrepareChangeLog
# step above.
self.GitCheckoutFile(CHANGELOG_FILE, self.vc.RemoteCandidateBranch())
# The version file has been modified by the patch. Reset it to the version
# on trunk.
self.GitCheckoutFile(VERSION_FILE, self.vc.RemoteCandidateBranch())
class CommitSquash(Step):
......@@ -313,10 +320,6 @@ class AddChangeLog(Step):
MESSAGE = "Add ChangeLog changes to trunk branch."
def RunStep(self):
# The change log has been modified by the patch. Reset it to the version
# on trunk and apply the exact changes determined by this PrepareChangeLog
# step above.
self.GitCheckoutFile(CHANGELOG_FILE, self.vc.RemoteCandidateBranch())
changelog_entry = FileToText(self.Config("CHANGELOG_ENTRY_FILE"))
old_change_log = FileToText(os.path.join(self.default_cwd, CHANGELOG_FILE))
new_change_log = "%s\n\n\n%s" % (changelog_entry, old_change_log)
......@@ -328,9 +331,6 @@ class SetVersion(Step):
MESSAGE = "Set correct version for trunk."
def RunStep(self):
# The version file has been modified by the patch. Reset it to the version
# on trunk and apply the correct version.
self.GitCheckoutFile(VERSION_FILE, self.vc.RemoteCandidateBranch())
self.SetVersion(os.path.join(self.default_cwd, VERSION_FILE), "new_")
......
......@@ -815,6 +815,10 @@ Performance and stability improvements on all platforms."""
Cmd(("git new-branch %s --upstream origin/candidates" %
TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk),
Cmd("git apply --index --reject \"%s\"" % TEST_CONFIG["PATCH_FILE"], ""),
Cmd("git checkout -f origin/candidates -- ChangeLog", "",
cb=ResetChangeLog),
Cmd("git checkout -f origin/candidates -- src/version.cc", "",
cb=self.WriteFakeVersionFile),
Cmd("git commit -am \"%s\"" % commit_msg_squashed, ""),
]
if manual:
......@@ -826,10 +830,6 @@ Performance and stability improvements on all platforms."""
Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""),
Cmd(("git new-branch %s --upstream origin/candidates" %
TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk),
Cmd("git checkout -f origin/candidates -- ChangeLog", "",
cb=ResetChangeLog),
Cmd("git checkout -f origin/candidates -- src/version.cc", "",
cb=self.WriteFakeVersionFile),
Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
cb=CheckVersionCommit),
Cmd("git cl land -f --bypass-hooks", ""),
......
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