clarify homebrew hints

This commit is contained in:
Kenneth Bingham 2025-03-14 12:38:42 -04:00
parent 259b8bf735
commit bd3ce83086
No known key found for this signature in database
GPG Key ID: 31709281860130B6

View File

@ -38,13 +38,20 @@ The concepts, tools, and procedures for managing existing downstream artifacts i
## Updating the Homebrew Formula ## Updating the Homebrew Formula
([`zrok.rb`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zrok.rb)) is a Ruby script in `Homebrew/homebrew-core` that defines the build procedure for the `zrok` binary. The Homebrew workflow triggered by the "released" event in GitHub sends a pull request to update the zrok formula. Usually, the only differences are the HTTP URL of the release's source code archive and it's checksum. It's also necessary to send a PR for the Ruby script when the zrok build procedure changes ([example PR](https://github.com/Homebrew/homebrew-core/pull/210917)). [`zrok.rb`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zrok.rb) is a Ruby script in `Homebrew/homebrew-core` that defines the build procedure for the `zrok` binary. The Homebrew workflow triggered by the "released" event in GitHub sends a pull request to update the zrok formula. Usually, the only differences are the HTTP URL of the release's source code archive and it's checksum. It's also necessary to send a PR for the Ruby script when the zrok build procedure changes ([example PR](https://github.com/Homebrew/homebrew-core/pull/210917)).
```bash ```bash
# Clone the Homebrew/homebrew-core repository # Clone the Homebrew/homebrew-core repository
brew tap --force homebrew/core brew tap --force homebrew/core
cd $(brew --repo homebrew/core) cd $(brew --repo homebrew/core)
# if already cloned then fetch
git fetch origin master
# if you're patching a PR HEAD that failed to build, then branch from that PR branch's HEAD
git fetch origin pull/<pr-number>/head # e.g. `git fetch origin pull/1234/head`
git checkout -b fix-homebrew FETCH_HEAD
# Disable API-based installation to enable local build and testing # Disable API-based installation to enable local build and testing
export HOMEBREW_NO_INSTALL_FROM_API=1 export HOMEBREW_NO_INSTALL_FROM_API=1
@ -56,7 +63,8 @@ brew install --verbose --formula --build-bottle zrok
# Test the zrok formula # Test the zrok formula
brew test zrok brew test zrok
``` ```
Finally, if correcting a failed GitHub Actions check on a PR based on Homebrew/homebrew-core master branch, then push commits as the ziti-ci user with the "gh_ci_key" SSH key to update the PR. A valid commit message is just the formula name and new version string, e.g., "zrok 1.0.0".
[Homebrew Documentation](https://docs.brew.sh/FAQ#can-i-edit-formulae-myself) [Homebrew Documentation](https://docs.brew.sh/FAQ#can-i-edit-formulae-myself)