(self)
| 156 | MESSAGE = "Increment version number." |
| 157 | |
| 158 | def RunStep(self): |
| 159 | new_patch = str(int(self["patch"]) + 1) |
| 160 | if self.Confirm("Automatically increment V8_PATCH_LEVEL? (Saying 'n' will " |
| 161 | "fire up your EDITOR on %s so you can make arbitrary " |
| 162 | "changes. When you're done, save the file and exit your " |
| 163 | "EDITOR.)" % VERSION_FILE): |
| 164 | text = FileToText(os.path.join(self.default_cwd, VERSION_FILE)) |
| 165 | text = MSub(r"(?<=#define V8_PATCH_LEVEL)(?P<space>\s+)\d*$", |
| 166 | r"\g<space>%s" % new_patch, |
| 167 | text) |
| 168 | TextToFile(text, os.path.join(self.default_cwd, VERSION_FILE)) |
| 169 | else: |
| 170 | self.Editor(os.path.join(self.default_cwd, VERSION_FILE)) |
| 171 | self.ReadAndPersistVersion("new_") |
| 172 | self["version"] = "%s.%s.%s.%s" % (self["new_major"], |
| 173 | self["new_minor"], |
| 174 | self["new_build"], |
| 175 | self["new_patch"]) |
| 176 | |
| 177 | |
| 178 | class CommitLocal(Step): |
nothing calls this directly
no test coverage detected