The formula’s livecheck block has never matched anything, and scripts/autobump.sh
cannot discover a tag on macOS. Both are fixed here; the second one was hiding a
third bug that broke discovery on Linux too.
1. livecheck never found a version
regex(%r{href=["']?[^"' >]*?/releases/v?(\d+(?:\.\d+)+)/}i)
Two independent reasons it fails against the real homepage:
- The homepage links a release without a trailing slash —
<a href="/vole/releases/v0.1.0-rc4">— and the regex demands/after the version. (\d+(?:\.\d+)+)cannot span a-rcNsuffix, so no pre-release is ever captured.
brew livecheck rodent-software/tap/vole on the current formula:
Error: vole: Unable to get versions
The regex now admits an optional trailing slash and an optional pre-release suffix, while still capturing a plain numeric release.
2. autobump used a GNU sed extension
v\? is a GNU extension. BSD sed (macOS /bin/sed) has no \?: it matches
nothing, so the script stopped with no release tag found. Replaced with the
portable BRE interval \{0,1\}.
3. discovery stripped the v, so the artifact URL 404’d
This one only surfaced after fixing (2). Discovery captured the bare number
(0.1.0-rc4), but the rest of the script uses the tag verbatim to build
/releases/<tag>/artifacts/..., so the no-argument form asked for
/releases/0.1.0-rc4/artifacts/SHA256SUMS and got a 404 — on Linux as well as
macOS. The v is now captured with the tag; version=${tag#v} still drops it
for the formula.
The documented workaround (passing an explicit tag) is how the rc4 bump was done, which is why this went unnoticed.
Verified
brew livecheckon the fixed formula:vole: 0.1.0-rc4 ==> 0.1.0-rc4(exit 0), versusUnable to get versions(exit 1) on the original — A/B against the live homepage.- Livecheck regex, evaluated from the file against the live homepage, matches all
four
0.1.0-rc{1..4}tags; HomebrewVersionpicks0.1.0-rc4as the maximum and treats it as current. A future final0.1.0still compares as newer and will be offered. - 7/7 regex cases pass, including plain
v0.1.0,v1.2.3/,0.2.0-beta.2, andv0.1.0-rc4/archive.tar;/releases/newand/issues/12are correctly ignored. scripts/autobump.sh volewith no tag runs end to end on macOS: discoversv0.1.0-rc4, downloads and verifies all four assets, and rewrites the formula idempotently.- The fail-safe still holds:
autobump.sh vole v0.1.0-rc3refuses withSHA256SUMS for v0.1.0-rc3 has no vole-darwin-arm64 entryand leaves the formula untouched (rc3 predates the macOS binaries). brew audit --strictclean,brew styleno offenses,ruby -candsh -nOK.
No version or checksum changes: the formula stays pinned to v0.1.0-rc4.