fix: show HTTP status in website-verify to distinguish 4xx from missing version

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-05-13 09:52:47 +02:00
co-authored by Claude Sonnet 4.6
parent f813288270
commit 62032d7654
+8 -4
View File
@@ -6,13 +6,17 @@ URL="https://sharedinbox.de/"
echo "Checking that version ${VERSION} is live at ${URL} ..."
for i in $(seq 1 6); do
if curl -sf "${URL}" | grep -q "x-version.*${VERSION}"; then
echo "OK: version ${VERSION} is live."
HTTP=$(curl -so /tmp/website-verify.html -w "%{http_code}" "${URL}" 2>/dev/null || true)
if [ "${HTTP}" != "200" ]; then
echo "HTTP ${HTTP} (attempt ${i}/6); waiting 10s ..."
elif grep -q "x-version.*${VERSION}" /tmp/website-verify.html; then
echo "OK: version ${VERSION} is live (HTTP ${HTTP})."
exit 0
else
echo "HTTP 200 but version ${VERSION} not found (attempt ${i}/6); waiting 10s ..."
fi
echo "Not yet (attempt ${i}/6); waiting 10s ..."
sleep 10
done
echo "FAIL: version ${VERSION} not found at ${URL}"
echo "FAIL: version ${VERSION} not live at ${URL} after 60s"
exit 1