Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/resolve-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ while IFS='|' read -r action current_sha current_tag; do
# Get latest release tag
latest_tag=$(gh api "repos/${action}/releases/latest" --jq '.tag_name' 2>/dev/null || echo "")

# On 404 (no published releases), gh leaks the error-response JSON to
# stdout — strip it silently rather than complain about "not strict semver"
# with a raw error body. The tags-API fallback below handles the case.
if [[ "$latest_tag" == *'{'* ]]; then
latest_tag=""
fi

# Validate tag is strict semver
if [[ -n "$latest_tag" ]] && [[ ! "$latest_tag" =~ $SEMVER_RE ]]; then
echo " Warning: latest release tag '${latest_tag}' is not strict semver, trying tags API"
Expand Down