Skip to content

Commit

Permalink
add fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
roumail committed Oct 15, 2024
1 parent c9f2d03 commit 1f9251f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def bump_version(bump_type):
subprocess.run(["bump2version", bump_type], check=True)
subprocess.run(["bump2version", "--new-version", bump_type], check=True)

# Extract the new version from bump2version's output
result = subprocess.run(
Expand Down Expand Up @@ -55,11 +55,12 @@ def update_git(new_version: str, delete_existing_tag: bool = False):
subprocess.run(["git", "fetch", "--tags"], check=True)
tag_name = f"v{new_version}"

if tag_exists_on_remote(tag_name) and delete_existing_tag:
delete_tag(tag_name)
else:
print(f"Tag {tag_name} already exists on the remote. Aborting!")
sys.exit(1)
if tag_exists_on_remote(tag_name):
if delete_existing_tag:
delete_tag(tag_name)
else:
print(f"Tag {tag_name} already exists on the remote. Aborting!")
sys.exit(1)

subprocess.run(
["git", "commit", "-am", f"Bump version to {new_version}"], check=True
Expand Down

0 comments on commit 1f9251f

Please sign in to comment.