| 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 # 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 self.ReadAndPersistVersion() | 162 self.ReadAndPersistVersion() |
| 163 | 163 |
| 164 | 164 |
| 165 class IncrementVersion(Step): | 165 class IncrementVersion(Step): |
| 166 MESSAGE = "Increment version number." | 166 MESSAGE = "Increment version number." |
| 167 | 167 |
| 168 def RunStep(self): | 168 def RunStep(self): |
| 169 if self._options.revert_master: | 169 if self._options.revert_master: |
| 170 return | 170 return |
| 171 new_patch = str(int(self["patch"]) + 1) | 171 new_patch = str(int(self["patch"]) + 1) |
| 172 if self.Confirm("Automatically increment PATCH_LEVEL? (Saying 'n' will " | 172 if self.Confirm("Automatically increment V8_PATCH_LEVEL? (Saying 'n' will " |
| 173 "fire up your EDITOR on %s so you can make arbitrary " | 173 "fire up your EDITOR on %s so you can make arbitrary " |
| 174 "changes. When you're done, save the file and exit your " | 174 "changes. When you're done, save the file and exit your " |
| 175 "EDITOR.)" % VERSION_FILE): | 175 "EDITOR.)" % VERSION_FILE): |
| 176 text = FileToText(os.path.join(self.default_cwd, VERSION_FILE)) | 176 text = FileToText(os.path.join(self.default_cwd, VERSION_FILE)) |
| 177 text = MSub(r"(?<=#define PATCH_LEVEL)(?P<space>\s+)\d*$", | 177 text = MSub(r"(?<=#define V8_PATCH_LEVEL)(?P<space>\s+)\d*$", |
| 178 r"\g<space>%s" % new_patch, | 178 r"\g<space>%s" % new_patch, |
| 179 text) | 179 text) |
| 180 TextToFile(text, os.path.join(self.default_cwd, VERSION_FILE)) | 180 TextToFile(text, os.path.join(self.default_cwd, VERSION_FILE)) |
| 181 else: | 181 else: |
| 182 self.Editor(os.path.join(self.default_cwd, VERSION_FILE)) | 182 self.Editor(os.path.join(self.default_cwd, VERSION_FILE)) |
| 183 self.ReadAndPersistVersion("new_") | 183 self.ReadAndPersistVersion("new_") |
| 184 self["version"] = "%s.%s.%s.%s" % (self["new_major"], | 184 self["version"] = "%s.%s.%s.%s" % (self["new_major"], |
| 185 self["new_minor"], | 185 self["new_minor"], |
| 186 self["new_build"], | 186 self["new_build"], |
| 187 self["new_patch"]) | 187 self["new_patch"]) |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 CommitLocal, | 307 CommitLocal, |
| 308 UploadStep, | 308 UploadStep, |
| 309 CommitRepository, | 309 CommitRepository, |
| 310 TagRevision, | 310 TagRevision, |
| 311 CleanUp, | 311 CleanUp, |
| 312 ] | 312 ] |
| 313 | 313 |
| 314 | 314 |
| 315 if __name__ == "__main__": # pragma: no cover | 315 if __name__ == "__main__": # pragma: no cover |
| 316 sys.exit(MergeToBranch().Run()) | 316 sys.exit(MergeToBranch().Run()) |
| OLD | NEW |