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

Unified Diff: tools/push-to-trunk/releases.py

Issue 594773003: Refactoring: Remove global configs in release scripts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove global configs. Created 6 years, 3 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
Index: tools/push-to-trunk/releases.py
diff --git a/tools/push-to-trunk/releases.py b/tools/push-to-trunk/releases.py
index fd1f725572d6228a1a9fdc7dcd74dd14a9168888..1d26198fde323479a38a32e5fefa7dc2ed96b43c 100755
--- a/tools/push-to-trunk/releases.py
+++ b/tools/push-to-trunk/releases.py
@@ -20,11 +20,9 @@ import sys
from common_includes import *
-CHROMIUM = "CHROMIUM"
-
CONFIG = {
- BRANCHNAME: "retrieve-v8-releases",
- PERSISTFILE_BASENAME: "/tmp/v8-releases-tempfile",
+ "BRANCHNAME": "retrieve-v8-releases",
+ "PERSISTFILE_BASENAME": "/tmp/v8-releases-tempfile",
}
# Expression for retrieving the bleeding edge revision from a commit message.
@@ -231,7 +229,7 @@ class RetrieveV8Releases(Step):
return releases
def RunStep(self):
- self.GitCreateBranch(self._config[BRANCHNAME])
+ self.GitCreateBranch(self._config["BRANCHNAME"])
# Get relevant remote branches, e.g. "svn/3.25".
branches = filter(lambda s: re.match(r"^svn/\d+\.\d+$", s),
self.GitRemotes())
@@ -284,7 +282,7 @@ class UpdateChromiumCheckout(Step):
cwd = self._options.chromium
self.GitCheckout("master", cwd=cwd)
self.GitPull(cwd=cwd)
- self.GitCreateBranch(self.Config(BRANCHNAME), cwd=cwd)
+ self.GitCreateBranch(self.Config("BRANCHNAME"), cwd=cwd)
def ConvertToCommitNumber(step, revision):
@@ -408,7 +406,7 @@ class CleanUp(Step):
def RunStep(self):
self.GitCheckout("master", cwd=self._options.chromium)
- self.GitDeleteBranch(self.Config(BRANCHNAME), cwd=self._options.chromium)
+ self.GitDeleteBranch(self.Config("BRANCHNAME"), cwd=self._options.chromium)
self.CommonCleanup()
@@ -449,6 +447,12 @@ class Releases(ScriptsBase):
def _ProcessOptions(self, options): # pragma: no cover
return True
+ def _Config(self):
+ return {
+ "BRANCHNAME": "retrieve-v8-releases",
+ "PERSISTFILE_BASENAME": "/tmp/v8-releases-tempfile",
+ }
+
def _Steps(self):
return [
Preparation,
@@ -463,4 +467,4 @@ class Releases(ScriptsBase):
if __name__ == "__main__": # pragma: no cover
- sys.exit(Releases(CONFIG).Run())
+ sys.exit(Releases().Run())

Powered by Google App Engine
This is Rietveld 408576698