Skip to content
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

Fix the error in Doc: How to Open a Homebrew Pull Request #17236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 18 additions & 3 deletions docs/How-To-Open-a-Homebrew-Pull-Request.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,28 @@ To make changes on a new branch and submit it for review, create a GitHub pull r
* If there's a `bottle do` block in the formula, don't remove or change it; we'll update it when we merge your PR.
5. Test your changes by running the following, and ensure they all pass without issue. For changed formulae and casks, make sure you do the `brew audit` step after your changed formula/cask has been installed.

### Test your formulae-related changes

```sh
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <CHANGED_FORMULA>
brew test <CHANGED_FORMULA>
```

### Test your cask-related changes

```sh
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_FROM_API=1 brew install <CHANGED_CASK>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Why is HOMEBREW_NO_AUTO_UPDATE=1 needed now and only for cask-related changes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is to stop brew updating itself while installing a new cask or formula. This option makes sense for both cask and formula.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the worry is that new changes might get pulled down from the remote tap that create conflicts with local formula/cask changes?

```

### Test your formulae/cask-related changes

```sh
brew tests
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <CHANGED_FORMULA|CHANGED_CASK>
brew test <CHANGED_FORMULA|CHANGED_CASK>
brew audit --strict --online <CHANGED_FORMULA|CHANGED_CASK>
brew style --fix <CHANGED_FORMULA|CHANGED_CASK>
```

Additionally, if your changes are more than changed formulae and casks, please use `brew tests` to run Homebrew's unit and integration tests.

6. [Make a separate commit](Formula-Cookbook.md#commit) for each changed formula with `git add` and `git commit`. Each formula's commits must be squashed.
* Please note that our required commit message format for simple version updates is "`<FORMULA_NAME> <NEW_VERSION>`", e.g. "`source-highlight 3.1.8`".
7. Upload your branch of new commits to your fork:
Expand Down