Handle missing release tags correctly (#64887)

This commit is contained in:
Jake Bailey authored and GitHub committed 2026-10-21 00:25:46 +00:00
1 parent 5733ab05f5
commit 538671d3cc
1 file changed
+2 -1
+2 -1
View File
@@ -370,7 +370,8 @@ extends:
;;
esac
existingTagCommit="$(gh api "repos/microsoft/TypeScript/git/ref/tags/$tag" --jq '.object.sha' 2>/dev/null || true)"
existingTagCommit="$(gh api "repos/microsoft/TypeScript/git/matching-refs/tags/$tag" \
--jq ".[] | select(.ref == \"refs/tags/$tag\") | .object.sha")"
if [ -n "$existingTagCommit" ]; then
if [ "$existingTagCommit" != "$RELEASE_SOURCE_COMMIT" ]; then
echo "Tag $tag points to $existingTagCommit, expected $RELEASE_SOURCE_COMMIT." >&2