fix: release CI downloads anvil CLI from /runner/download #8
fix/release-ci-anvil-download-url
into main
Problem
The release step was curling `/cli/download` — which doesn’t exist on this server. The endpoint returns the standard HTML 404/error page, CI dutifully saved the HTML to `/usr/local/bin/anvil` and `chmod +x`’d it, and then `anvil release create` failed with:
/usr/local/bin/anvil: 2: Syntax error: newline unexpected
…when dash tried to interpret `<html lang="en">` as shell. Both releases on main (66017f96 and 6a8dd644) hit this, and no CalVer tags have shipped since the anvil/anvil-runner binary was unified.
Observed on pipeline run `c298f4a1a4` (the release for 6a8dd644, the blob_sizes/3 commit that closed fangorn/ex_git_objectstore#22):
View epub docs at \"doc/ex_git_objectstore.epub\"
/usr/local/bin/anvil: 2: Syntax error: newline unexpected
Fix
- Switch the URL to `/runner/download`, which is the real endpoint for the unified `anvil`/`anvil-runner` binary (fangorn/anvil#49).
- Add `-f` to `curl` so it fails on HTTP errors. Previously `-sL` silently wrote the error response body to the output file, which is how the HTML landed there in the first place.
- Add a post-download `file /usr/local/bin/anvil | grep -q ‘ELF’` sanity check so that if the endpoint regresses again, CI fails loudly with a helpful message instead of crashing at runtime with a dash syntax error.
Test plan
- Only touches `.anvil.yml`; no Elixir changes
- CI will re-run on main after merge — if the next release job produces a tag, the fix worked
Manually verified that `/runner/download?os=Linux&arch=aarch64` returns an 8.7 MB ELF aarch64 binary (`file` confirms).
🤖 Generated with Claude Code