| 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 """ | 6 """ |
| 7 Script for auto-increasing the version on bleeding_edge. | 7 Script for auto-increasing the version on bleeding_edge. |
| 8 | 8 |
| 9 The script can be run regularly by a cron job. It will increase the build | 9 The script can be run regularly by a cron job. It will increase the build |
| 10 level of the version on bleeding_edge if: | 10 level of the version on bleeding_edge if: |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 def RunStep(self): | 192 def RunStep(self): |
| 193 self.GitCreateBranch(VERSION_BRANCH, "master") | 193 self.GitCreateBranch(VERSION_BRANCH, "master") |
| 194 | 194 |
| 195 self.SetVersion(os.path.join(self.default_cwd, VERSION_FILE), "new_") | 195 self.SetVersion(os.path.join(self.default_cwd, VERSION_FILE), "new_") |
| 196 | 196 |
| 197 try: | 197 try: |
| 198 msg = "[Auto-roll] Bump up version to %s" % self["new_version"] | 198 msg = "[Auto-roll] Bump up version to %s" % self["new_version"] |
| 199 self.GitCommit("%s\n\nTBR=%s" % (msg, self._options.author), | 199 self.GitCommit("%s\n\nTBR=%s" % (msg, self._options.author), |
| 200 author=self._options.author) | 200 author=self._options.author) |
| 201 if self._options.svn: | 201 self.GitUpload(author=self._options.author, |
| 202 self.SVNCommit("branches/bleeding_edge", msg) | 202 force=self._options.force_upload, |
| 203 else: | 203 bypass_hooks=True) |
| 204 self.GitUpload(author=self._options.author, | 204 self.GitCLLand() |
| 205 force=self._options.force_upload, | |
| 206 bypass_hooks=True) | |
| 207 self.GitDCommit() | |
| 208 print "Successfully changed the version." | 205 print "Successfully changed the version." |
| 209 finally: | 206 finally: |
| 210 # Clean up. | 207 # Clean up. |
| 211 self.GitCheckout("master") | 208 self.GitCheckout("master") |
| 212 self.DeleteBranch(VERSION_BRANCH) | 209 self.DeleteBranch(VERSION_BRANCH) |
| 213 | 210 |
| 214 | 211 |
| 215 class BumpUpVersion(ScriptsBase): | 212 class BumpUpVersion(ScriptsBase): |
| 216 def _PrepareOptions(self, parser): | 213 def _PrepareOptions(self, parser): |
| 217 parser.add_argument("--dry_run", help="Don't commit the new version.", | 214 parser.add_argument("--dry_run", help="Don't commit the new version.", |
| (...skipping 23 matching lines...) Expand all Loading... |
| 241 GetLKGRVersion, | 238 GetLKGRVersion, |
| 242 LKGRVersionUpToDateBailout, | 239 LKGRVersionUpToDateBailout, |
| 243 GetTrunkVersion, | 240 GetTrunkVersion, |
| 244 CalculateVersion, | 241 CalculateVersion, |
| 245 CheckTreeStatus, | 242 CheckTreeStatus, |
| 246 ChangeVersion, | 243 ChangeVersion, |
| 247 ] | 244 ] |
| 248 | 245 |
| 249 if __name__ == "__main__": # pragma: no cover | 246 if __name__ == "__main__": # pragma: no cover |
| 250 sys.exit(BumpUpVersion().Run()) | 247 sys.exit(BumpUpVersion().Run()) |
| OLD | NEW |