OLD | NEW |
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 import argparse | 6 import argparse |
7 import json | 7 import json |
8 import os | 8 import os |
9 import sys | 9 import sys |
10 import urllib | 10 import urllib |
(...skipping 30 matching lines...) Expand all Loading... |
41 class DetectLastRoll(Step): | 41 class DetectLastRoll(Step): |
42 MESSAGE = "Detect commit ID of the last Chromium roll." | 42 MESSAGE = "Detect commit ID of the last Chromium roll." |
43 | 43 |
44 def RunStep(self): | 44 def RunStep(self): |
45 # The revision that should be rolled. Check for the latest of the most | 45 # The revision that should be rolled. Check for the latest of the most |
46 # recent releases based on commit timestamp. | 46 # recent releases based on commit timestamp. |
47 revisions = self.GetRecentReleases( | 47 revisions = self.GetRecentReleases( |
48 max_age=self._options.max_age * DAY_IN_SECONDS) | 48 max_age=self._options.max_age * DAY_IN_SECONDS) |
49 assert revisions, "Didn't find any recent release." | 49 assert revisions, "Didn't find any recent release." |
50 | 50 |
51 # Update Chromium checkout before DEPS check to fix possible race-condition | |
52 self.GitPull(cwd=self._options.chromium) | |
53 | |
54 # Interpret the DEPS file to retrieve the v8 revision. | 51 # Interpret the DEPS file to retrieve the v8 revision. |
55 # TODO(machenbach): This should be part or the roll-deps api of | 52 # TODO(machenbach): This should be part or the roll-deps api of |
56 # depot_tools. | 53 # depot_tools. |
57 Var = lambda var: '%s' | 54 Var = lambda var: '%s' |
58 exec(FileToText(os.path.join(self._options.chromium, "DEPS"))) | 55 exec(FileToText(os.path.join(self._options.chromium, "DEPS"))) |
59 | 56 |
60 # The revision rolled last. | 57 # The revision rolled last. |
61 self["last_roll"] = vars['v8_revision'] | 58 self["last_roll"] = vars['v8_revision'] |
62 last_version = self.GetVersionTag(self["last_roll"]) | 59 last_version = self.GetVersionTag(self["last_roll"]) |
63 assert last_version, "The last rolled v8 revision is not tagged." | 60 assert last_version, "The last rolled v8 revision is not tagged." |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 def _Steps(self): | 126 def _Steps(self): |
130 return [ | 127 return [ |
131 CheckActiveRoll, | 128 CheckActiveRoll, |
132 DetectLastRoll, | 129 DetectLastRoll, |
133 RollChromium, | 130 RollChromium, |
134 ] | 131 ] |
135 | 132 |
136 | 133 |
137 if __name__ == "__main__": # pragma: no cover | 134 if __name__ == "__main__": # pragma: no cover |
138 sys.exit(AutoRoll().Run()) | 135 sys.exit(AutoRoll().Run()) |
OLD | NEW |