Create a new release branch
(v: str)
| 49 | |
| 50 | |
| 51 | def prepare(v: str): |
| 52 | """Create a new release branch""" |
| 53 | logger.info("Start to prepare release branch for version %s", v) |
| 54 | _check_release_version(v) |
| 55 | os.chdir(PROJECT_ROOT_DIR) |
| 56 | branch = f"releases-{v}" |
| 57 | try: |
| 58 | subprocess.check_call(f"git checkout -b {branch}", shell=True) |
| 59 | bump_version(version=v, l="all") |
| 60 | subprocess.check_call("git add -u", shell=True) |
| 61 | subprocess.check_call(f"git commit -m 'prepare release for {v}'", shell=True) |
| 62 | except BaseException: |
| 63 | logger.exception("Prepare branch failed") |
| 64 | subprocess.check_call(f"git checkout - && git branch -D {branch}", shell=True) |
| 65 | raise |
| 66 | |
| 67 | |
| 68 | def build(v: str): |
nothing calls this directly
no test coverage detected