From 326668da77746e1a79ef9922520af19b3a6807bc Mon Sep 17 00:00:00 2001 From: mini-bomba <55105495+mini-bomba@users.noreply.github.com> Date: Tue, 21 Jun 2022 14:15:49 +0200 Subject: [PATCH] Allow overwriting tags honestly, how did I miss it? --- src/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index b97ce70..a39700d 100644 --- a/src/main.py +++ b/src/main.py @@ -132,14 +132,15 @@ def get_boolean(key: str) -> bool: # Create/move tag print("::group::🏷️ Creating/Moving the tag...") -gitproc = subprocess.Popen(["git", "tag", tag_name, target_commit], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) +gitproc = subprocess.Popen(["git", "tag", "-f" tag_name, target_commit], + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) out, _ = gitproc.communicate() print("::stop-commands::git-output") print(out.decode()) if gitproc.returncode != 0: print("::git-output::") print("::endgroup::") - print(f"::error::❌ Command 'git tag {tag_name} {target_commit}' returned with non-zero exit code!") + print(f"::error::❌ Command 'git tag -f {tag_name} {target_commit}' returned with non-zero exit code!") exit(gitproc.returncode) gitproc = subprocess.Popen(["git", "push", "--force", "origin", tag_name], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) out, _ = gitproc.communicate()