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

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

Issue 1090183002: [release-tools] Chrome V8 version is now converted to real V8 version (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Swapped ' with " Created 5 years, 7 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 | « no previous file | 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 for current_version in current_os["versions"]: 453 for current_version in current_os["versions"]:
454 if current_version["channel"] != "canary": 454 if current_version["channel"] != "canary":
455 continue 455 continue
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 _ConvertToRealV8Version(self, v8_version):
464 if v8_version == "N/A": 464 if v8_version == "N/A":
465 return "" 465 return ""
466 if v8_version.split(".")[3]== "0": 466 if v8_version.split(".")[3]== "0":
467 return self.GitGetHashOfTag(v8_version[:-2]) 467 return v8_version[:-2]
468 468 return v8_version
469 return self.GitGetHashOfTag(v8_version)
470 469
471 def _CreateCandidate(self, current_version): 470 def _CreateCandidate(self, current_version):
472 params = None 471 params = None
473 url_to_call = (OMAHA_PROXY_URL + "v8.json?version=" 472 url_to_call = (OMAHA_PROXY_URL + "v8.json?version="
474 + current_version["previous_version"]) 473 + current_version["previous_version"])
475 result_raw = self.ReadURL( 474 result_raw = self.ReadURL(
476 url_to_call, 475 url_to_call,
477 params, 476 params,
478 wait_plan=[5, 20] 477 wait_plan=[5, 20]
479 ) 478 )
480 previous_v8_version = json.loads(result_raw)["v8_version"] 479 previous_v8_version = (
481 v8_previous_version_hash = self._GetGitHashForV8Version(previous_v8_version) 480 self._ConvertToRealV8Version(json.loads(result_raw)["v8_version"]))
Michael Achenbach 2015/04/28 20:48:49 nit: 4 spaces after round parenthesis or better: p
481 v8_previous_version_hash = ""
482 if previous_v8_version != "":
483 v8_previous_version_hash = self.GitGetHashOfTag(previous_v8_version)
482 484
483 current_v8_version = current_version["v8_version"] 485 current_v8_version = (
484 v8_version_hash = self._GetGitHashForV8Version(current_v8_version) 486 self._ConvertToRealV8Version(current_version["v8_version"]))
487 v8_version_hash = ""
488 if current_v8_version != "":
489 v8_version_hash = self.GitGetHashOfTag(current_v8_version)
485 490
486 current_candidate = { 491 current_candidate = {
487 "chrome_version": current_version["version"], 492 "chrome_version": current_version["version"],
488 "os": current_version["os"], 493 "os": current_version["os"],
489 "release_date": current_version["current_reldate"], 494 "release_date": current_version["current_reldate"],
490 "v8_version": current_v8_version, 495 "v8_version": current_v8_version,
491 "v8_version_hash": v8_version_hash, 496 "v8_version_hash": v8_version_hash,
492 "v8_previous_version": previous_v8_version, 497 "v8_previous_version": previous_v8_version,
493 "v8_previous_version_hash": v8_previous_version_hash, 498 "v8_previous_version_hash": v8_previous_version_hash,
494 } 499 }
(...skipping 67 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 | tools/release/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698