-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
How-to-Create-and-Maintain-a-Tap: improve docs. #20639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the documentation for creating and maintaining taps by adding practical step-by-step commands and examples that were previously missing. The documentation now provides clear guidance on how to actually create a tap, push it to GitHub, and add formulae or casks.
Key changes include:
- Added concrete command examples with expected output for creating taps using
brew tap-new - Included GitHub CLI commands for pushing new taps to repositories
- Added a new section on creating formulae/casks with
brew createexamples - Fixed inconsistent references from
repotorepositorythroughout the document
We don't really tell people actually how to create a tap here so let's provide more commands and output to help them. While we're here, also fix some bad references to `repo` that weren't updated when they should have been and let VSCode autoformat the Markdown.
fbea702 to
62a3b5e
Compare
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
| Initialized empty Git repository in /opt/homebrew/Library/Taps/$YOUR_GITHUB_USERNAME/homebrew-tap/.git/ | ||
| ... | ||
| ==> Created $YOUR_GITHUB_USERNAME/tap | ||
| /opt/homebrew/Library/Taps/$YOUR_GITHUB_USERNAME/homebrew-tap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's a user to make of this message:
When a pull request making changes to a formula (or formulae) becomes green
(all checks passed), then you can publish the built bottles.
To do so, label your PR as `pr-pull` and the workflow will be triggered.
Is that true of any repo that is a tap? Or just homebrew's built-in one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, this should apply to any tap that's pushed to GitHub with the auto-created files in .github/workflows left in place. See this post for how that plays out: https://brew.sh/2020/11/18/homebrew-tap-with-bottles-uploaded-to-github-releases/
| Next, you can push it to a new GitHub repository: | ||
|
|
||
| ```console | ||
| $ gh repo create $YOUR_GITHUB_USERNAME/homebrew-tap --push --public --source "$(brew --repository $YOUR_GITHUB_USERNAME/homebrew-tap)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I supposed to do this from inside the newly-created tap directory? Is it meant to be my working directory? Or should I maintain the code elsewhere? (Feels extremely weird cd'ing into /opt for this purpose)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested this and it ran fine from my home directory, no cd necessary.
We don't really tell people actually how to create a tap here so let's provide more commands and output to help them.
While we're here, also fix some bad references to
repothat weren't updated when they should have been and let VSCode autoformat the Markdown.