The release rewrites the tap's source formula, and the install docs name both Homebrew forms - #11
Merged
Merged
Conversation
…ame both Homebrew forms avison9/homebrew-tap now carries Formula/cdclint.rb, which builds from the tagged source the way homebrew/core would, beside the cask goreleaser writes. goreleaser has no source-formula support (its formula output downloads binaries, which core refuses), so a step after it rewrites the formula's url and sha256 to this tag: the hash is of GitHub's source tarball for the tag, which GitHub keeps stable for tags. It runs only for a final release, like the major tag step, and pushes with the same token the cask uses. Homebrew resolves a name that is both a formula and a cask to the formula, so `brew install avison9/tap/cdclint` builds from source from now on and the binary is `brew install --cask avison9/tap/cdclint`. INSTALLING.md says so, on macOS and Linux, and in the uninstall table; RELEASING.md lists the new step and the two install checks. Verified: the sed rewrites exactly the url and sha256 lines of the real formula (dry run with v0.2.0's tarball); the workflow parses.
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.
Companion to avison9/homebrew-tap#1, which adds
Formula/cdclint.rb: a formula that builds from the tagged source, the shape homebrew/core requires and the file that goes there once the notability bar is cleared.What changes
urlandsha256in the tap to this tag's source tarball and pushes withHOMEBREW_TAP_GITHUB_TOKEN, the way the cask is written. goreleaser cannot do this itself: its formula output downloads binaries, which core refuses. Final releases only, like the major-tag step. The hash is of GitHub's source tarball for the tag, which GitHub keeps stable for tags.brew install avison9/tap/cdclintnow builds from source (Homebrew installsgofrom a bottle once, then seconds ofgo build), andbrew install --cask avison9/tap/cdclintis the binary. Both named on macOS and Linux, and in the uninstall table.Verified
urlandsha256lines of the real formula (dry run withv0.2.0's tarball, diff shows those two lines).brew test,brew audit --strictandbrew styleinghcr.io/homebrew/ubuntu22.04(details on the tap PR).Order
Merge the tap PR first, then this. The next tag (
v0.2.2, with #10) is the first release that exercises the step; checkFormula/cdclint.rbin the tap points at that tag afterwards.