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

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

Issue 1493633005: [Release] releases.py should not crash on non-release versions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reformat Created 5 years 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 | « no previous file | no next file » | 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 456
457 current_candidate = self._CreateCandidate(current_version) 457 current_candidate = self._CreateCandidate(current_version)
458 canaries.append(current_candidate) 458 canaries.append(current_candidate)
459 459
460 chrome_releases = {"canaries": canaries} 460 chrome_releases = {"canaries": canaries}
461 self["chrome_releases"] = chrome_releases 461 self["chrome_releases"] = chrome_releases
462 462
463 def _GetGitHashForV8Version(self, v8_version): 463 def _GetGitHashForV8Version(self, v8_version):
464 if v8_version == "N/A": 464 if v8_version == "N/A":
465 return "" 465 return ""
466
467 real_v8_version = v8_version
466 if v8_version.split(".")[3]== "0": 468 if v8_version.split(".")[3]== "0":
467 return self.GitGetHashOfTag(v8_version[:-2]) 469 real_v8_version = v8_version[:-2]
468 470
469 return self.GitGetHashOfTag(v8_version) 471 try:
472 return self.GitGetHashOfTag(real_v8_version)
473 except GitFailedException:
474 return ""
470 475
471 def _CreateCandidate(self, current_version): 476 def _CreateCandidate(self, current_version):
472 params = None 477 params = None
473 url_to_call = (OMAHA_PROXY_URL + "v8.json?version=" 478 url_to_call = (OMAHA_PROXY_URL + "v8.json?version="
474 + current_version["previous_version"]) 479 + current_version["previous_version"])
475 result_raw = self.ReadURL( 480 result_raw = self.ReadURL(
476 url_to_call, 481 url_to_call,
477 params, 482 params,
478 wait_plan=[5, 20] 483 wait_plan=[5, 20]
479 ) 484 )
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 RetrieveChromiumV8Releases, 567 RetrieveChromiumV8Releases,
563 RetrieveChromiumBranches, 568 RetrieveChromiumBranches,
564 RetrieveInformationOnChromeReleases, 569 RetrieveInformationOnChromeReleases,
565 CleanUp, 570 CleanUp,
566 WriteOutput, 571 WriteOutput,
567 ] 572 ]
568 573
569 574
570 if __name__ == "__main__": # pragma: no cover 575 if __name__ == "__main__": # pragma: no cover
571 sys.exit(Releases().Run()) 576 sys.exit(Releases().Run())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698