KEMBAR78
How-to-Create-and-Maintain-a-Tap: improve docs. by MikeMcQuaid · Pull Request #20639 · Homebrew/brew · GitHub
Skip to content

Conversation

MikeMcQuaid
Copy link
Member

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.

@MikeMcQuaid MikeMcQuaid requested a review from Copilot September 5, 2025 16:40
Copy link
Contributor

@Copilot Copilot AI left a 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 create examples
  • Fixed inconsistent references from repo to repository throughout 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.
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
@MikeMcQuaid MikeMcQuaid requested a review from samford September 5, 2025 17:47
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Sep 5, 2025
Merged via the queue into main with commit 1da17b8 Sep 5, 2025
36 checks passed
@MikeMcQuaid MikeMcQuaid deleted the improve_new_tap_docs branch September 5, 2025 18:24
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
Copy link

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?

Copy link
Member

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)"
Copy link

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)

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants