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

Unified Diff: tools/release/auto_push.py

Issue 878913002: Let release scripts determine version based on tags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove unused method. Created 5 years, 11 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 | « no previous file | tools/release/auto_roll.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/auto_push.py
diff --git a/tools/release/auto_push.py b/tools/release/auto_push.py
index f6cdcb67850f394109804655b7c35f8fbad73b7a..121288f5b532d17b13edf568d020674e62b9ef35 100755
--- a/tools/release/auto_push.py
+++ b/tools/release/auto_push.py
@@ -36,7 +36,6 @@ import urllib
from common_includes import *
import push_to_candidates
-PUSH_MESSAGE_RE = re.compile(r".* \(based on ([a-fA-F0-9]+)\)$")
class Preparation(Step):
MESSAGE = "Preparation."
@@ -47,30 +46,24 @@ class Preparation(Step):
class FetchCandidate(Step):
- MESSAGE = "Fetching V8 roll candidate ref."
+ MESSAGE = "Fetching V8 roll ref."
def RunStep(self):
- self.Git("fetch origin +refs/heads/candidate:refs/heads/candidate")
- self["candidate"] = self.Git("show-ref -s refs/heads/candidate").strip()
+ # The roll ref points to the candidate to be rolled.
+ self.Git("fetch origin +refs/heads/roll:refs/heads/roll")
+ self["candidate"] = self.Git("show-ref -s refs/heads/roll").strip()
-class CheckLastPush(Step):
- MESSAGE = "Checking last V8 push to candidates."
+class LastReleaseBailout(Step):
+ MESSAGE = "Checking last V8 release base."
def RunStep(self):
- last_push = self.FindLastCandidatesPush()
+ last_release = self.GetLatestReleaseBase()
+ commits = self.GitLog(
+ format="%H", git_hash="%s..%s" % (last_release, self["candidate"]))
- # Retrieve the master revision of the last push from the text in
- # the push commit message.
- last_push_title = self.GitLog(n=1, format="%s", git_hash=last_push)
- candidate = PUSH_MESSAGE_RE.match(last_push_title).group(1)
-
- if not candidate: # pragma: no cover
- self.Die("Could not retrieve master revision for candidates push %s"
- % last_push)
-
- if self["candidate"] == candidate:
- print "Already pushed current candidate %s" % candidate
+ if not commits:
+ print "Already pushed current candidate %s" % self["candidate"]
return True
@@ -118,7 +111,7 @@ class AutoPush(ScriptsBase):
return [
Preparation,
FetchCandidate,
- CheckLastPush,
+ LastReleaseBailout,
PushToCandidates,
]
« no previous file with comments | « no previous file | tools/release/auto_roll.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698