From 0947dee26b7d7b482929e911c028594e500b2a31 Mon Sep 17 00:00:00 2001 From: Riccardo Tacconi Date: Wed, 18 Nov 2026 10:56:35 +0000 Subject: [PATCH] fix(release): treat non-numeric release ids as missing gh api prints a 404 JSON body on stdout when a tag has no release; stage-public treated that as an existing id and skipped create. --- scripts/release.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/release.sh b/scripts/release.sh index 0f11684..9695f18 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -479,7 +479,10 @@ cmd_stage_public() { ) local existing + # gh api prints the 404 JSON body on stdout even when it fails; only a + # numeric id means the release already exists. existing="$(nix develop --command gh api "repos/${repo}/releases/tags/${TAG}" --jq .id 2>/dev/null || true)" + [[ "${existing}" =~ ^[0-9]+$ ]] || existing="" if [[ -n "${existing}" ]]; then echo "==> Public draft/release ${TAG} exists (id ${existing}); uploading assets with --clobber..." else