Skip to content

Commit 5445a47

Browse files
fix(ci): check remote tags in tag-release.sh (#385)
The idempotency guard only checked local tags, but CI checkouts don't fetch tags. Add git ls-remote fallback so re-runs of the Release workflow skip already-pushed tags. Co-authored-by: jpoehnelt-bot <jpoehnelt-bot@users.noreply.github.com>
1 parent ad99aa9 commit 5445a47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/tag-release.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -euo pipefail
77
VERSION=$(node -p "require('./package.json').version")
88
TAG="v${VERSION}"
99

10-
if git rev-parse "$TAG" >/dev/null 2>&1; then
10+
if git rev-parse "$TAG" >/dev/null 2>&1 || git ls-remote --exit-code --tags origin "$TAG" >/dev/null 2>&1; then
1111
echo "Tag $TAG already exists, skipping"
1212
exit 0
1313
fi

0 commit comments

Comments
 (0)