From b635039c5726afc564e22bdfdae374e50e28b114 Mon Sep 17 00:00:00 2001 From: Rohail Taimour Date: Tue, 15 Oct 2024 07:39:08 +0200 Subject: [PATCH] add fixes --- release.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/release.py b/release.py index 3c8659f..78b80d3 100644 --- a/release.py +++ b/release.py @@ -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