Make the Homebrew submission automatic by being the tap - #39
Merged
Conversation
The last manual step in a release was "copy packaging/homebrew/donottype.rb into
the tap's Casks/ and push". It was documented as unavoidable because a
submission is a pull request to somebody else's repository — but that was only
true of homebrew-cask, which this project has not applied to. The tap it
actually told people to install from, bojieli/tap, did not exist, so the cask's
own install line had never worked.
So this repository becomes the tap. `Casks/` is one of the three directories
Homebrew looks in, which makes the file somebody installs the file reviewed
here: one copy, no submission, nothing to forget.
brew tap bojieli/donottype https://github.com/bojieli/DoNotType
brew install --cask donottype
The URL is needed because a tap is normally located by the name `homebrew-<x>`
and this repository is named for the product. That is the entire cost, and it
buys away a second repository, a cross-repository token, and a copy that can go
stale between releases.
The new packaging.yml does the bump on `release: published` and commits it. That
trigger rather than the tag, because the cask cannot be correct any earlier:
update-packaging.sh reads the checksum from the release's own .sha256 asset,
which 404s while the release is still a draft. It is also the moment the
artifacts become real, so it is when the tap should follow them. The rolling
`latest` prerelease is excluded — every green build on main republishes it, and
a cask following that would hand users a development build.
Kept separate from release.yml rather than bolted onto it: that workflow is
tag-driven and ends by drafting a release for a human to read, and adding a
release trigger there would have meant guarding every existing job against an
event none of them want.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Homebrew warns on it now, on every command a tapped user runs. It was always redundant here: the default check is that the download host matches homepage, and both are github.com/bojieli/DoNotType. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
brew audit caught it: the app's artifact requires Sonoma, matching LSMinimumSystemVersion in Resources/Info.plist and .macOS(.v14) in Package.swift, but the cask promised nothing. Homebrew would install onto an older system and the app would refuse to launch, which is a worse way to learn the requirement than being told before the download starts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The string form warned on every command a tapped user ran. Homebrew's own deprecation names the replacement, and macos_requirement.rb defaults the comparator to >=, so the bare symbol is still a floor and not an exact match. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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 last manual step in a release was "copy
packaging/homebrew/donottype.rbinto the tap'sCasks/and push". The runbook called it unavoidable because a submission is a pull request to somebody else's repository — but that is only true of homebrew-cask, which this project has not applied to. The tap it actually told people to install from,bojieli/tap, does not exist, so the cask's own install line had never worked.This repository becomes the tap
Casks/is one of the three directories Homebrew looks in, so the file somebody installs is the file reviewed here. One copy, no submission, nothing to forget.The URL is needed because a tap is normally located by the name
homebrew-<x>and this repository is named for the product. That is the entire cost, and it buys away a second repository, a cross-repository token, and a copy that can go stale between releases.The bump runs itself
New
packaging.ymlruns onrelease: published, points the cask at that version withscripts/update-packaging.sh, and commits the result.That trigger rather than the tag, because the cask cannot be correct any earlier: the script reads the checksum from the release's own
.sha256asset, which 404s while the release is still a draft. It is also the moment the artifacts become real, so it is when the tap should follow them. The rollinglatestprerelease is excluded, since every green build on main republishes it and a cask following that would hand users a development build.Kept separate from
release.ymlrather than bolted on: that workflow is tag-driven and ends by drafting a release for a human to read, and adding a release trigger there would have meant guarding every existing job against an event none of them want.Three real defects Homebrew's own checks caught
Found by tapping this branch locally and running
brew audit, not by reading:verified:is deprecated. It warned on every command a tapped user ran, and was always redundant here — the default check is that the download host matcheshomepage, which it does.LSMinimumSystemVersionandPackage.swift, but the cask promised nothing. Homebrew would install onto an older system and the app would refuse to launch.depends_on macos:is deprecated too. Now the symbol form.macos_requirement.rbdefaults the comparator to>=, so it is still a floor, confirmed by a dry run on macOS 26 that installs.Verified end to end
Tapped from this branch and installed for real, into a temporary
--appdirso the working install was untouched:brew audit --cask --onlineexits 0.brew install --caskdownloads from the release, verifies the checksum, and installs.brew uninstall --caskis clean.🤖 Generated with Claude Code