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

Side by Side Diff: tools/release/releases.py

Issue 1003383003: Make release scripts even more robust. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/release/common_includes.py ('k') | tools/release/test_scripts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # This script retrieves the history of all V8 branches and 6 # This script retrieves the history of all V8 branches and
7 # their corresponding Chromium revisions. 7 # their corresponding Chromium revisions.
8 8
9 # Requires a chromium checkout with branch heads: 9 # Requires a chromium checkout with branch heads:
10 # gclient sync --with_branch_heads 10 # gclient sync --with_branch_heads
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 self.Die("DEPS file not present.") 327 self.Die("DEPS file not present.")
328 328
329 329
330 class UpdateChromiumCheckout(Step): 330 class UpdateChromiumCheckout(Step):
331 MESSAGE = "Update the checkout and create a new branch." 331 MESSAGE = "Update the checkout and create a new branch."
332 332
333 def RunStep(self): 333 def RunStep(self):
334 cwd = self._options.chromium 334 cwd = self._options.chromium
335 self.GitCheckout("master", cwd=cwd) 335 self.GitCheckout("master", cwd=cwd)
336 self.GitPull(cwd=cwd) 336 self.GitPull(cwd=cwd)
337 self.DeleteBranch(self.Config("BRANCHNAME"), cwd=cwd)
337 self.GitCreateBranch(self.Config("BRANCHNAME"), cwd=cwd) 338 self.GitCreateBranch(self.Config("BRANCHNAME"), cwd=cwd)
338 339
339 340
340 def ConvertToCommitNumber(step, revision): 341 def ConvertToCommitNumber(step, revision):
341 # Simple check for git hashes. 342 # Simple check for git hashes.
342 if revision.isdigit() and len(revision) < 8: 343 if revision.isdigit() and len(revision) < 8:
343 return revision 344 return revision
344 return step.GetCommitPositionNumber( 345 return step.GetCommitPositionNumber(
345 revision, cwd=os.path.join(step._options.chromium, "v8")) 346 revision, cwd=os.path.join(step._options.chromium, "v8"))
346 347
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 "candidates.")) 482 "candidates."))
482 parser.add_argument("-c", "--chromium", 483 parser.add_argument("-c", "--chromium",
483 help=("The path to your Chromium src/ " 484 help=("The path to your Chromium src/ "
484 "directory to automate the V8 roll.")) 485 "directory to automate the V8 roll."))
485 parser.add_argument("--csv", help="Path to a CSV file for export.") 486 parser.add_argument("--csv", help="Path to a CSV file for export.")
486 parser.add_argument("-m", "--max-releases", type=int, default=0, 487 parser.add_argument("-m", "--max-releases", type=int, default=0,
487 help="The maximum number of releases to track.") 488 help="The maximum number of releases to track.")
488 parser.add_argument("--json", help="Path to a JSON file for export.") 489 parser.add_argument("--json", help="Path to a JSON file for export.")
489 490
490 def _ProcessOptions(self, options): # pragma: no cover 491 def _ProcessOptions(self, options): # pragma: no cover
492 options.force_readline_defaults = True
491 return True 493 return True
492 494
493 def _Config(self): 495 def _Config(self):
494 return { 496 return {
495 "BRANCHNAME": "retrieve-v8-releases", 497 "BRANCHNAME": "retrieve-v8-releases",
496 "PERSISTFILE_BASENAME": "/tmp/v8-releases-tempfile", 498 "PERSISTFILE_BASENAME": "/tmp/v8-releases-tempfile",
497 } 499 }
498 500
499 def _Steps(self): 501 def _Steps(self):
500 return [ 502 return [
501 Preparation, 503 Preparation,
502 RetrieveV8Releases, 504 RetrieveV8Releases,
503 SwitchChromium, 505 SwitchChromium,
504 UpdateChromiumCheckout, 506 UpdateChromiumCheckout,
505 RetrieveChromiumV8Releases, 507 RetrieveChromiumV8Releases,
506 RietrieveChromiumBranches, 508 RietrieveChromiumBranches,
507 CleanUp, 509 CleanUp,
508 WriteOutput, 510 WriteOutput,
509 ] 511 ]
510 512
511 513
512 if __name__ == "__main__": # pragma: no cover 514 if __name__ == "__main__": # pragma: no cover
513 sys.exit(Releases().Run()) 515 sys.exit(Releases().Run())
OLDNEW
« no previous file with comments | « tools/release/common_includes.py ('k') | tools/release/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698