From 33a67913342214cf6c8dd15d8551f0bb3adb78b8 Mon Sep 17 00:00:00 2001 From: CHEN Zhongpu Date: Mon, 6 May 2024 21:58:42 +0800 Subject: [PATCH] Fix the error in Doc: How to Open a Homebrew Pull Request - `--build-from-source` is for formula only. - `brew test` is for formula only. --- docs/How-To-Open-a-Homebrew-Pull-Request.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/How-To-Open-a-Homebrew-Pull-Request.md b/docs/How-To-Open-a-Homebrew-Pull-Request.md index f39a322dce2d8..ce30fca2798cd 100644 --- a/docs/How-To-Open-a-Homebrew-Pull-Request.md +++ b/docs/How-To-Open-a-Homebrew-Pull-Request.md @@ -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 + brew test + ``` + +### Test your cask-related changes + + ```sh + HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_FROM_API=1 brew install + ``` + +### Test your formulae/cask-related changes + ```sh - brew tests - HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source - brew test brew audit --strict --online + brew style --fix ``` +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 "` `", e.g. "`source-highlight 3.1.8`". 7. Upload your branch of new commits to your fork: