Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: tools/release/chromium_roll.py

Issue 977903002: Make auto-roller roll recent release based on timestamp. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/release/auto_roll.py ('k') | tools/release/common_includes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/chromium_roll.py
diff --git a/tools/release/chromium_roll.py b/tools/release/chromium_roll.py
index eb7c3b561b31b739ee34c256a1903f1ed2cc3629..de0a569a905d411817b0ac81254113202c4a30d6 100755
--- a/tools/release/chromium_roll.py
+++ b/tools/release/chromium_roll.py
@@ -24,30 +24,21 @@ class Preparation(Step):
def RunStep(self):
# Update v8 remote tracking branches.
self.GitFetchOrigin()
+ self.Git("fetch origin +refs/tags/*:refs/tags/*")
-class DetectLastPush(Step):
- MESSAGE = "Detect commit ID of last release."
+class PrepareRollCandidate(Step):
+ MESSAGE = "Robustness checks of the roll candidate."
def RunStep(self):
- # The revision that should be rolled.
- self["last_push"] = self._options.last_push or self.GetLatestRelease()
- self["push_title"] = self.GitLog(n=1, format="%s",
- git_hash=self["last_push"])
+ self["roll_title"] = self.GitLog(n=1, format="%s",
+ git_hash=self._options.roll)
- # The master revision this release is based on.
- self["push_base"] = self.GetLatestReleaseBase()
-
- # FIXME(machenbach): Manually specifying a revision doesn't work at the
- # moment. Needs more complicated logic to find the correct push_base above.
- # Maybe delete that parameter entirely?
- assert not self._options.last_push
-
- # Determine the master revision of the last roll.
+ # Make sure the last roll and the roll candidate are releases.
+ version = self.GetVersionTag(self._options.roll)
+ assert version, "The revision to roll is not tagged."
version = self.GetVersionTag(self._options.last_roll)
- assert version
- self["last_rolled_base"] = self.GetLatestReleaseBase(version=version)
- assert self["last_rolled_base"]
+ assert version, "The revision used as last roll is not tagged."
class SwitchChromium(Step):
@@ -77,7 +68,7 @@ class UpdateChromiumCheckout(Step):
# Update v8 remotes.
self.GitFetchOrigin()
- self.GitCreateBranch("v8-roll-%s" % self["last_push"],
+ self.GitCreateBranch("v8-roll-%s" % self._options.roll,
cwd=self._options.chromium)
@@ -87,15 +78,15 @@ class UploadCL(Step):
def RunStep(self):
# Patch DEPS file.
if self.Command(
- "roll-dep", "v8 %s" % self["last_push"],
+ "roll-dep", "v8 %s" % self._options.roll,
cwd=self._options.chromium) is None:
- self.Die("Failed to create deps for %s" % self["last_push"])
+ self.Die("Failed to create deps for %s" % self._options.roll)
message = []
- message.append("Update V8 to %s." % self["push_title"].lower())
+ message.append("Update V8 to %s." % self["roll_title"].lower())
message.append(
- ROLL_SUMMARY % (self["last_rolled_base"][:8], self["push_base"][:8]))
+ ROLL_SUMMARY % (self._options.last_roll[:8], self._options.roll[:8]))
message.append(ISSUE_MSG)
@@ -111,7 +102,7 @@ class UploadCL(Step):
print "CL uploaded."
else:
self.GitCheckout("master", cwd=self._options.chromium)
- self.GitDeleteBranch("v8-roll-%s" % self["last_push"],
+ self.GitDeleteBranch("v8-roll-%s" % self._options.roll,
cwd=self._options.chromium)
print "Dry run - don't upload."
@@ -130,8 +121,8 @@ class CleanUp(Step):
def RunStep(self):
print("Congratulations, you have successfully rolled %s into "
- "Chromium. Please don't forget to update the v8rel spreadsheet."
- % self["last_push"])
+ "Chromium."
+ % self._options.roll)
# Clean up all temporary files.
Command("rm", "-f %s*" % self._config["PERSISTFILE_BASENAME"])
@@ -142,10 +133,9 @@ class ChromiumRoll(ScriptsBase):
parser.add_argument("-c", "--chromium", required=True,
help=("The path to your Chromium src/ "
"directory to automate the V8 roll."))
- parser.add_argument("-l", "--last-push",
- help="The git commit ID of the last candidates push.")
parser.add_argument("--last-roll", required=True,
help="The git commit ID of the last rolled version.")
+ parser.add_argument("roll", nargs=1, help="Revision to roll."),
parser.add_argument("--use-commit-queue",
help="Check the CQ bit on upload.",
default=False, action="store_true")
@@ -158,6 +148,7 @@ class ChromiumRoll(ScriptsBase):
options.requires_editor = False
options.force = True
options.manual = False
+ options.roll = options.roll[0]
return True
def _Config(self):
@@ -168,7 +159,7 @@ class ChromiumRoll(ScriptsBase):
def _Steps(self):
return [
Preparation,
- DetectLastPush,
+ PrepareRollCandidate,
DetermineV8Sheriff,
SwitchChromium,
UpdateChromiumCheckout,
« no previous file with comments | « tools/release/auto_roll.py ('k') | tools/release/common_includes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698