feat(release): generate the Homebrew formula - #65
Merged
Conversation
The tap exists and the formula is installed and tested: brew audit --strict is clean, brew test passes, and the three binaries plus a copy of the art templates land where the formula says. Generated rather than hand-maintained, for the reason the tap's own README already gives about its casks: a hand-edit is overwritten by the next release, silently. The checksums come from the .sha256 files the matrix produced, so the formula cannot describe an archive that was never built -- if a target failed to upload, the job fails rather than publishing a formula that 404s. The generator was checked against the formula that brew actually installed, and reproduces it byte for byte. The tap was resynced to match its wrapping so the first automated run is a no-op rather than a diff nobody asked for. Best-effort like the release notification: without HOMEBREW_TAP_TOKEN it says so and exits clean. A formula one version behind is a smaller problem than a release that fails after the crate is already published. Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The tap exists, the formula is installed, and
brew install vyncint/tap/mossaicworks:brew audit --strictis clean — it took two rounds:versionis redundant when it can be scanned from the URL, andlivecheckhas to precede the platform blocks.Generated, not hand-maintained
The tap already existed for another project, and its README states the rule: "generated by GoReleaser from each tool's release workflow. Edit them there, not here." mossaic isn't GoReleaser, but the principle holds — a hand-edit is overwritten by the next release, silently.
So
binaries.ymlgains aformulajob that builds the file from the.sha256files the matrix just produced. That ordering matters: the formula cannot describe an archive that was never built, because if a target failed to upload there is no checksum and the job fails rather than publishing a formula that 404s. Given last release shipped without a Windows zip, that is not hypothetical.The generator was checked against reality
A generator that emits something different from the formula I verified would be worthless. So I ran it against the real v0.6.2 release and diffed it against the formula brew actually installed:
I then resynced the tap to the generator's exact wrapping, re-audited and re-tested, so the first automated run is a no-op rather than a diff nobody asked for.
Setup
Needs
HOMEBREW_TAP_TOKEN— a PAT with write access tovyncint/homebrew-tap. Without it the job logs a notice and exits clean, same asnotify-testing-repo: a formula one version behind is a much smaller problem than a release that fails after the crate is already on crates.io.Until that secret exists the tap stays on 0.6.2, which is current — so nothing is broken in the meantime.
README
The
brew installline is back, and this time it has been run. Four routes now, only the last needing Rust.