Publish a Homebrew formula - #97
Merged
Merged
Conversation
- Build and attach macOS binaries for arm64 and x86_64. - Generate the formula from the released archives. - Update the tap when a version tag lands, skipping a candidate.
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.
What changes
brew install beetlebugorg/tap/go-dimsinstalls thedimscommand, which signs URLs and runs the server. It follows the shapetile57already uses: prebuilt archives, a formula generated from them, and a tap job that a candidate tag skips.Releases carried Linux binaries only, so a formula built from them would have failed on macOS, where most people run
brew. Two jobs now build macOS binaries.build-macosbuilds arm64 onmacos-latestand x86_64 onmacos-15-intel, and attachesdims-macos-arm64.zipanddims-macos-amd64.zip.scripts/brew-formula.shprints the formula, reading each archive's sha256 out of the artifacts the release just built.homebrewclones the tap, writesFormula/go-dims.rb, and pushes. It is gated on!contains(github.ref_name, '-'), sov1.0.0-rc1leaves the tap alone andv1.0.0updates it. A missingHOMEBREW_TAP_TOKENlogs a warning rather than failing the release.The macOS build links Homebrew's libvips, so the formula carries
depends_on "vips"insideon_macos. The Linux build is static, verified asnot a dynamic executable, so it declares nothing.The README gains an install section, and
docs/docs/installation.mdgains the standalone binary section its own introduction had been promising. The image tag table also gains thenextrow.Verify
The formula was installed with Homebrew on Linux, from a local tap, using a formula generated against the real
v1.0.0-rc1archives:The generated sha256 matches the published archive, the Ruby parses, and
shellcheckis clean on the generator. Thedimsbinary sits at the root of each zip, which is whatbin.install "dims"expects.Note that Homebrew on Linux pulls
gccandbinutilsas dependencies of any formula without a bottle, even one that only unpacks a static binary. That is Homebrew's behaviour rather than something this formula asks for.Not verified here
The macOS job cannot run on this machine.
make allitself is already exercised by the existing version probe inpr.yml, so what is unproven is the macOS toolchain setup:brew install vips, the ANTLR wrapper, andPKG_CONFIG_PATH. The first tag to run this workflow will exercise it, andbuild-macosfails the release if the binary does not report the expected version.