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

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

Issue 869613007: Retrieve recent v8 release information based on tags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/releases.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 2013 the V8 project authors. All rights reserved. 2 # Copyright 2013 the V8 project authors. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following 10 # copyright notice, this list of conditions and the following
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 print "> ", 584 print "> ",
585 answer = self.ReadLine() 585 answer = self.ReadLine()
586 586
587 # Takes a file containing the patch to apply as first argument. 587 # Takes a file containing the patch to apply as first argument.
588 def ApplyPatch(self, patch_file, revert=False): 588 def ApplyPatch(self, patch_file, revert=False):
589 try: 589 try:
590 self.GitApplyPatch(patch_file, revert) 590 self.GitApplyPatch(patch_file, revert)
591 except GitFailedException: 591 except GitFailedException:
592 self.WaitForResolvingConflicts(patch_file) 592 self.WaitForResolvingConflicts(patch_file)
593 593
594 def GetRecentReleases(self, max_age):
595 # Make sure tags are fetched.
596 self.Git("fetch origin +refs/tags/*:refs/tags/*")
597
598 # Current timestamp.
599 time_now = int(self._side_effect_handler.GetUTCStamp())
600
601 # List every tag from a given period.
602 revisions = self.Git("rev-list --max-age=%d --tags" %
603 int(time_now - max_age)).strip()
604
605 def IsTagged(revision):
606 return VERSION_RE.match(
607 self.Git("describe --tags %s" % revision).strip())
608
609 # Filter out revisions who's tag is off by one or more commits.
610 return filter(IsTagged, revisions.splitlines())
611
594 def GetLatestVersion(self): 612 def GetLatestVersion(self):
595 # Use cached version if available. 613 # Use cached version if available.
596 if self["latest_version"]: 614 if self["latest_version"]:
597 return self["latest_version"] 615 return self["latest_version"]
598 616
599 # Make sure tags are fetched. 617 # Make sure tags are fetched.
600 self.Git("fetch origin +refs/tags/*:refs/tags/*") 618 self.Git("fetch origin +refs/tags/*:refs/tags/*")
601 version = sorted(filter(VERSION_RE.match, self.vc.GetTags()), 619 version = sorted(filter(VERSION_RE.match, self.vc.GetTags()),
602 key=SortingKey, reverse=True)[0] 620 key=SortingKey, reverse=True)[0]
603 self["latest_version"] = version 621 self["latest_version"] = version
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 for (number, step_class) in enumerate([BootstrapStep] + step_classes): 859 for (number, step_class) in enumerate([BootstrapStep] + step_classes):
842 steps.append(MakeStep(step_class, number, self._state, self._config, 860 steps.append(MakeStep(step_class, number, self._state, self._config,
843 options, self._side_effect_handler)) 861 options, self._side_effect_handler))
844 for step in steps[options.step:]: 862 for step in steps[options.step:]:
845 if step.Run(): 863 if step.Run():
846 return 0 864 return 0
847 return 0 865 return 0
848 866
849 def Run(self, args=None): 867 def Run(self, args=None):
850 return self.RunSteps(self._Steps(), args) 868 return self.RunSteps(self._Steps(), args)
OLDNEW
« no previous file with comments | « no previous file | tools/release/releases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698