commit bcbc9608b156c0901ac30f5c89da09fe86d2efac
parent b4ee0a1956131e1123b3e3f99504ebb83e19f9d4
Author: Steven Atkinson <steven@atkinson.mn>
Date: Sun, 16 Apr 2023 21:42:43 -0700
Option to delete existing tag
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/bump_version.py b/bump_version.py
@@ -80,13 +80,22 @@ def main():
os.system("cat " + os.path.join(PROJECT_ROOT, "installer", "changelog.txt"))
print("\n\n--------------------")
+ tagname = f"v{newVersionInfo}"
+ remove_tag = input(
+ f"\nAttempt to remove existing tag for {tagname}? Y/N: "
+ )
+
+ if remove_tag == "y" or remove_tag == "Y":
+ os.system(f"git tag -d {tagname}")
+ os.system(f"git push --delete origin {tagname}")
+
edit = input(
"\nTag version and git push to origin (will prompt for commit message)? Y/N: "
)
if edit == "y" or edit == "Y":
os.system("git commit -a --allow-empty")
- os.system("git tag v" + str(newVersionInfo))
+ os.system("git tag " + tagname)
os.system("git push && git push --tags")