From 57b728c7e3a745dfa9f4413dd1dab2d0eb0a05b7 Mon Sep 17 00:00:00 2001 From: samialabri Date: Fri, 30 Oct 2026 18:29:32 +0400 Subject: [PATCH] gitea-release.sh: work with any subset of bundles A release with only the Windows installer aborted: shasum failed on the unmatched *.deb and *.rpm globs under set -e. Checksum the files that exist. Co-Authored-By: Claude Opus 5.5 --- scripts/gitea-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gitea-release.sh b/scripts/gitea-release.sh index d493744..4d5ef72 100755 --- a/scripts/gitea-release.sh +++ b/scripts/gitea-release.sh @@ -31,7 +31,7 @@ if [ -f "$SETUP" ] && [ ! -f "$SETUP.sig" ]; then --app-version "$V" "$SETUP" fi -(cd "$DIR" && rm -f SHA256SUMS && shasum -a 256 -- *.AppImage *.deb *.rpm *-setup.exe kestrove-nmh-* 2>/dev/null > SHA256SUMS; cat SHA256SUMS) +(cd "$DIR" && rm -f SHA256SUMS && for f in *.AppImage *.deb *.rpm *-setup.exe kestrove-nmh-*; do if [ -f "$f" ]; then shasum -a 256 -- "$f"; fi; done > SHA256SUMS; cat SHA256SUMS) ID=$(curl -fsS -H "$AUTH" "$API/repos/$REPO/releases/tags/$TAG" 2>/dev/null | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{console.log(JSON.parse(s).id||"")}catch{console.log("")}})') if [ -z "$ID" ]; then