homebrew-tap
Clone
Read only, no credentials:
https://rodent.software/homebrew-tap.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/homebrew-tap.git
Homebrew tap for Rodent Software.
Fix livecheck regex and make autobump's tag discovery portable
c7d7b6e445f15e2e26751bd806818cb6d356f36e · Keenan Nemetz · 3d ago · parent cbc6b7ec
Fix livecheck regex and make autobump's tag discovery portable
The livecheck regex never matched anything: the homepage links a release
without a trailing slash (/vole/releases/v0.1.0-rc4), and the version group
could not span the -rcN suffix. livecheck found no versions at all, so it
could never report an update. Match an optional trailing slash and an
optional pre-release suffix, still capturing a plain numeric release.
The discovery step in autobump.sh used `v\?`, a GNU sed extension. BSD sed
(macOS /bin/sed) has no `\?`, matches nothing, and the script stopped with
"no release tag found" on a Mac. Use the portable BRE interval `\{0,1\}`.
Discovery also stripped the `v` from the tag, while the rest of the script
uses the tag verbatim to build the artifact URL — so even under GNU sed the
no-argument form 404'd on SHA256SUMS. Capture the `v` with the tag;
`version=${tag#v}` still drops it for the formula.
Verified: livecheck extracts all four rc tags and Homebrew's Version picks
0.1.0-rc4 as current; `scripts/autobump.sh vole` runs end to end on macOS;
and it still refuses a release whose SHA256SUMS lacks the pinned assets
(rc3, which predates the macOS binaries).
Formula/vole.rb +5−1
| @@ -12,9 +12,13 @@ class Vole < Formula | |||
| 12 | 12 | version "0.1.0-rc4" | |
| 13 | 13 | license "Apache-2.0" | |
| 14 | 14 | ||
| 15 | # Release links on the homepage look like <a href="/vole/releases/v0.1.0-rc4"> | ||
| 16 | # — no trailing slash, and pre-releases carry a -rcN suffix. The version group | ||
| 17 | # has to admit both, or livecheck finds nothing (and, if it matched only the | ||
| 18 | # numeric part, it would offer 0.1.0 over the pinned 0.1.0-rc4 forever). | ||
| 15 | 19 | livecheck do | |
| 16 | 20 | url :homepage | |
| 17 | regex(%r{href=["']?[^"' >]*?/releases/v?(\d+(?:\.\d+)+)/}i) | ||
| 21 | regex(%r{href=["']?[^"' >]*?/releases/v?(\d+(?:\.\d+)+(?:-[0-9a-z][0-9a-z.]*)?)["' >/]}i) | ||
| 18 | 22 | end | |
| 19 | 23 | ||
| 20 | 24 | depends_on "git" | |