| 185 | |
| 186 | |
| 187 | class CreateRelease(ScriptsBase): |
| 188 | def _PrepareOptions(self, parser): |
| 189 | group = parser.add_mutually_exclusive_group() |
| 190 | group.add_argument("-f", "--force", |
| 191 | help="Don't prompt the user.", |
| 192 | default=True, action="store_true") |
| 193 | group.add_argument("-m", "--manual", |
| 194 | help="Prompt the user at every important step.", |
| 195 | default=False, action="store_true") |
| 196 | parser.add_argument("-R", "--revision", |
| 197 | help="The git commit ID to push (defaults to HEAD).") |
| 198 | |
| 199 | def _ProcessOptions(self, options): # pragma: no cover |
| 200 | if not options.author or not options.reviewer: |
| 201 | print("Reviewer (-r) and author (-a) are required.") |
| 202 | return False |
| 203 | return True |
| 204 | |
| 205 | def _Config(self): |
| 206 | return { |
| 207 | "PERSISTFILE_BASENAME": "/tmp/create-releases-tempfile", |
| 208 | "COMMITMSG_FILE": "/tmp/v8-create-releases-tempfile-commitmsg", |
| 209 | } |
| 210 | |
| 211 | def _Steps(self): |
| 212 | return [ |
| 213 | Preparation, |
| 214 | PrepareBranchRevision, |
| 215 | IncrementVersion, |
| 216 | DetectLastRelease, |
| 217 | DeleteBranchRef, |
| 218 | PushBranchRef, |
| 219 | MakeBranch, |
| 220 | SetVersion, |
| 221 | EnableMergeWatchlist, |
| 222 | CommitBranch, |
| 223 | LandBranch, |
| 224 | TagRevision, |
| 225 | CleanUp, |
| 226 | ] |
| 227 | |
| 228 | |
| 229 | if __name__ == "__main__": # pragma: no cover |