From ae3fc7ff82bb2f2a3c7770a0929c4b9b18e14df3 Mon Sep 17 00:00:00 2001 From: Marco Steinacher Date: Fri, 7 Aug 2026 14:54:56 +0200 Subject: [PATCH] Fix: Only match full tags in pre release checks. When releasing vA.B.C the check should only fail if there is a git tag that matches "vA.B.C" exactly and not "vA.B.C-RC1", for example. --- src/releasing/pre-release-checks-git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/releasing/pre-release-checks-git.sh b/src/releasing/pre-release-checks-git.sh index 938b1653..475d71a8 100755 --- a/src/releasing/pre-release-checks-git.sh +++ b/src/releasing/pre-release-checks-git.sh @@ -64,7 +64,7 @@ function preReleaseCheckGit() { local tags tags=$(git tag) || die "The following command failed (see above): git tag" - if grep -q --fixed-strings "$version" <<<"$tags"; then + if grep -q --fixed-strings --line-regexp "$version" <<<"$tags"; then logError "tag %s already exists locally, adjust version or delete it with git tag -d %s" "$version" "$version" if hasRemoteTag "$version"; then printf >&2 "Note, it also exists on the remote which means you also need to delete it there -- e.g. via git push origin :%s\n" "$version"