Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions automq_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
from pathlib import Path
import argparse


main_branch = "develop"


def fail(msg):
print(msg)
sys.exit(1)
Expand Down Expand Up @@ -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])
Expand All @@ -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')
Expand Down