fix(release): guard PREV_TAG with rev-parse before using in log range
CI / Test (push) Successful in 28s
CI / Build (push) Successful in 25s

If PREV_TAG is a malformed or non-reachable tag name, git log fails
with exit 128 under set -e. Validate with git rev-parse --verify first
and fall back to a full log if it doesn't resolve.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 15:27:06 +02:00
co-authored by Claude Sonnet 4.6
parent 249f1694ef
commit 749b01bfa2
+1 -1
View File
@@ -64,7 +64,7 @@ jobs:
API="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases"
PREV_TAG=$(git tag --sort=-version:refname | { grep -v "^${TAG}$" || true; } | head -1)
if [ -n "$PREV_TAG" ]; then
if [ -n "$PREV_TAG" ] && git rev-parse --verify "${PREV_TAG}" >/dev/null 2>&1; then
NOTES=$(git log "${PREV_TAG}..${TAG}" --pretty=format:"- %s" --no-merges)
else
NOTES=$(git log --pretty=format:"- %s" --no-merges)