Skip to content

Commit e75ca29

Browse files
authored
Fix curl status check in release script to handle all non-200 responses (#7455)
Change the curl status check from `== "404"` to `!= "200"` for both Haddock and Metatheory site validation. This makes the check more robust by catching all error status codes (403, 404, 500, etc.) and connection failures (000) rather than only checking for 404. This ensures the release script correctly identifies when sites are not accessible, regardless of the specific error code returned.
1 parent 8e9a7d9 commit e75ca29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/interactive-release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ print-status() {
371371

372372
local HADDOCK_URL="https://plutus.cardano.intersectmbo.org/haddock/$VERSION/"
373373
local CURL_STATE=$(curl -s -o /dev/null -w "%{http_code}\n" $HADDOCK_URL)
374-
if [[ $CURL_STATE == "404" ]]; then
374+
if [[ $CURL_STATE != "200" ]]; then
375375
echo -e "[7] ❌ Deploy the Haddock site for the new release\n Haddock site not found at $HADDOCK_URL\n Follow the workflow at https://github.com/IntersectMBO/plutus/actions/workflows/haddock-site.yml"
376376
else
377377
echo -e "[7] ✅ Deploy the Haddock site for the new release\n Haddock site found at $HADDOCK_URL"
@@ -380,7 +380,7 @@ print-status() {
380380

381381
local METATHEORY_URL="https://plutus.cardano.intersectmbo.org/metatheory/$VERSION/"
382382
CURL_STATE=$(curl -s -o /dev/null -w "%{http_code}\n" $METATHEORY_URL)
383-
if [[ $CURL_STATE == "404" ]]; then
383+
if [[ $CURL_STATE != "200" ]]; then
384384
echo -e "[8] ❌ Deploy the Metatheory site for the new release\n Metatheory site not found at $METATHEORY_URL\n Follow the workflow at https://github.com/IntersectMBO/plutus/actions/workflows/metatheory-site.yml"
385385
else
386386
echo -e "[8] ✅ Deploy the Metatheory site for the new release\n Metatheory site found at $METATHEORY_URL"

0 commit comments

Comments
 (0)