diff --git a/scripts/website-verify.sh b/scripts/website-verify.sh index ac700aa..8426532 100755 --- a/scripts/website-verify.sh +++ b/scripts/website-verify.sh @@ -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