From 2040ca00c44952e5556da6629df4452b73ba9bb4 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Thu, 12 Feb 2026 15:33:26 -0600 Subject: [PATCH] Fix AUR workflow curl check for GitHub redirects GitHub returns 302 redirects for release assets, not 200. Use curl -L to follow redirects and check final status code. --- .github/workflows/release-aur.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-aur.yml b/.github/workflows/release-aur.yml index 58ce6f37e..b6b042e19 100644 --- a/.github/workflows/release-aur.yml +++ b/.github/workflows/release-aur.yml @@ -53,9 +53,11 @@ jobs: while [ $ELAPSED -lt $MAX_WAIT ]; do echo "Checking for release assets (${ELAPSED}s elapsed)..." - # Check if both tarballs exist - AMD64_EXISTS=$(curl -sI "https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_amd64.tar.gz" | head -n 1 | grep -q "200 OK" && echo "true" || echo "false") - AARCH64_EXISTS=$(curl -sI "https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_aarch64.tar.gz" | head -n 1 | grep -q "200 OK" && echo "true" || echo "false") + # Check if both tarballs exist (follow redirects, GitHub returns 302) + AMD64_CODE=$(curl -sL -o /dev/null -w "%{http_code}" "https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_amd64.tar.gz") + AARCH64_CODE=$(curl -sL -o /dev/null -w "%{http_code}" "https://github.com/vicrodh/qbz/releases/download/v${VERSION}/qbz_${VERSION}_aarch64.tar.gz") + AMD64_EXISTS=$([[ "$AMD64_CODE" == "200" ]] && echo "true" || echo "false") + AARCH64_EXISTS=$([[ "$AARCH64_CODE" == "200" ]] && echo "true" || echo "false") if [ "$AMD64_EXISTS" = "true" ] && [ "$AARCH64_EXISTS" = "true" ]; then echo "Both release assets are available!"