| 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: |
| 11 - the lkgr version is smaller than the version of the latest revision, | 11 - the lkgr version is smaller than the version of the latest revision, |
| 12 - the lkgr version is not a version change itself, | 12 - the lkgr version is not a version change itself, |
| 13 - the tree is not closed for maintenance. | 13 - the tree is not closed for maintenance. |
| 14 | 14 |
| 15 The new version will be the maximum of the bleeding_edge and trunk versions +1. | 15 The new version will be the maximum of the bleeding_edge and trunk versions +1. |
| 16 E.g. latest bleeding_edge version: 3.22.11.0 and latest trunk 3.23.0.0 gives | 16 E.g. latest bleeding_edge version: 3.22.11.0 and latest trunk 3.23.0.0 gives |
| 17 the new version 3.23.1.0. | 17 the new version 3.23.1.0. |
| 18 | 18 |
| 19 This script requires a depot tools git checkout. I.e. 'fetch v8'. | 19 This script requires a depot tools git checkout. I.e. 'fetch v8'. |
| 20 """ | 20 """ |
| 21 | 21 |
| 22 import argparse | 22 import argparse |
| 23 import os | 23 import os |
| 24 import sys | 24 import sys |
| 25 | 25 |
| 26 from common_includes import * | 26 from common_includes import * |
| 27 | 27 |
| 28 CONFIG = { | |
| 29 PERSISTFILE_BASENAME: "/tmp/v8-bump-up-version-tempfile", | |
| 30 PATCH_FILE: "/tmp/v8-bump-up-version-tempfile-patch-file", | |
| 31 } | |
| 32 | |
| 33 VERSION_BRANCH = "auto-bump-up-version" | 28 VERSION_BRANCH = "auto-bump-up-version" |
| 34 | 29 |
| 35 | 30 |
| 36 class Preparation(Step): | 31 class Preparation(Step): |
| 37 MESSAGE = "Preparation." | 32 MESSAGE = "Preparation." |
| 38 | 33 |
| 39 def RunStep(self): | 34 def RunStep(self): |
| 40 # Check for a clean workdir. | 35 # Check for a clean workdir. |
| 41 if not self.GitIsWorkdirClean(): # pragma: no cover | 36 if not self.GitIsWorkdirClean(): # pragma: no cover |
| 42 # This is in case a developer runs this script on a dirty tree. | 37 # This is in case a developer runs this script on a dirty tree. |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 215 |
| 221 def _ProcessOptions(self, options): # pragma: no cover | 216 def _ProcessOptions(self, options): # pragma: no cover |
| 222 if not options.dry_run and not options.author: | 217 if not options.dry_run and not options.author: |
| 223 print "Specify your chromium.org email with -a" | 218 print "Specify your chromium.org email with -a" |
| 224 return False | 219 return False |
| 225 options.wait_for_lgtm = False | 220 options.wait_for_lgtm = False |
| 226 options.force_readline_defaults = True | 221 options.force_readline_defaults = True |
| 227 options.force_upload = True | 222 options.force_upload = True |
| 228 return True | 223 return True |
| 229 | 224 |
| 225 def _Config(self): |
| 226 return { |
| 227 "PERSISTFILE_BASENAME": "/tmp/v8-bump-up-version-tempfile", |
| 228 } |
| 229 |
| 230 def _Steps(self): | 230 def _Steps(self): |
| 231 return [ | 231 return [ |
| 232 Preparation, | 232 Preparation, |
| 233 GetCurrentBleedingEdgeVersion, | 233 GetCurrentBleedingEdgeVersion, |
| 234 LastChangeBailout, | 234 LastChangeBailout, |
| 235 FetchLKGR, | 235 FetchLKGR, |
| 236 GetLKGRVersion, | 236 GetLKGRVersion, |
| 237 LKGRVersionUpToDateBailout, | 237 LKGRVersionUpToDateBailout, |
| 238 GetTrunkVersion, | 238 GetTrunkVersion, |
| 239 CalculateVersion, | 239 CalculateVersion, |
| 240 CheckTreeStatus, | 240 CheckTreeStatus, |
| 241 ChangeVersion, | 241 ChangeVersion, |
| 242 ] | 242 ] |
| 243 | 243 |
| 244 if __name__ == "__main__": # pragma: no cover | 244 if __name__ == "__main__": # pragma: no cover |
| 245 sys.exit(BumpUpVersion(CONFIG).Run()) | 245 sys.exit(BumpUpVersion().Run()) |
| OLD | NEW |