diff --git a/automq_release.py b/automq_release.py index a634bcf922..63d9c59af6 100644 --- a/automq_release.py +++ b/automq_release.py @@ -23,9 +23,9 @@ from pathlib import Path import argparse - main_branch = "develop" + def fail(msg): print(msg) sys.exit(1) @@ -150,8 +150,8 @@ def do_release(tag_version): print("updating docker compose") regexReplace("docker/docker-compose.yaml", "image: automqinc/kafka:.*$", "image: automqinc/kafka:%s" % tag_version) - cmd("Committing changes", ["git", "commit", "-a", "-m", "ci: Bump version to %s" % tag_version]) - cmd("Pushing changes", ["git", "push", "origin", new_branch]) + cmd("Committing changes", ["git", "commit", "-a", "-m", "ci: Bump version to %s" % tag_version], allow_failure=True) + cmd("Pushing changes", ["git", "push", "origin", new_branch], allow_failure=True) cmd("Tagging %s" % tag_version, ["git", "tag", "-a", tag_version, "-m", "release %s" % tag_version, "-s"]) cmd("Pushing tag %s" % tag_version, ["git", "push", "origin", tag_version]) @@ -161,6 +161,7 @@ def clean_local_tags(): tags = cmd_output('git tag -l').split() cmd("Cleaning local tags", ['git', 'tag', '-d'] + tags) + def check_before_started(tag_version): check_tools(["git"]) cmd("Verifying that you have no unstaged git changes", 'git diff --exit-code --quiet')