fix(release): make Release.yml robust to curl exit codes #23
Reference in New Issue
Block a user
Delete Branch "fix-release-curl-robustness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
After #22 moved the branch-readiness poll before
.versionwrite, the workflow started failing every run withexitcode '23'and no error output. Exit 23 =CURLE_WRITE_ERRORfrom curl in the wait loop'sBRANCH_STATUS=$(curl ...). Withset -e, any non-zero status from a command substitution aborts the script before the retry/echo path runs — so the failure was both deterministic and silent.Changes
api_callhelper that wraps curl with|| rc=$?and emits<http_code>|<curl_rc>plus the response body. Curl exit codes can no longer kill the script viaset -e.next-releasebranch explicitly viaPOST /branchesinstead of relying on thenew_branchparameter of the CHANGELOG.md PUT. Eliminates the race between branch creation and subsequent file writes.next-releasedirectly (not base), so writes always carry the correct SHA.Test plan