https://github.com/bitrise-steplib/steps-brew-install
https://github.com/bitrise-steplib/steps-brew-install
bitrise bitrise-step ci production-code
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bitrise-steplib/steps-brew-install
- Owner: bitrise-steplib
- License: mit
- Created: 2017-10-27T11:15:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T12:37:36.000Z (about 2 years ago)
- Last Synced: 2025-03-24T07:51:59.432Z (about 1 year ago)
- Topics: bitrise, bitrise-step, ci, production-code
- Language: Go
- Homepage:
- Size: 294 KB
- Stars: 2
- Watchers: 12
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Brew install
[](https://github.com/bitrise-steplib/steps-brew-install/releases)
Install or upgrade dependencies with Homebrew.
Description
Install or upgrade dependencies using Homebrew, a package manager for MacOS.
### Configuring the Step
Homebrew defines the available packages as formulae. Our Step needs the name of the Homebrew formulae you want to use, either specified as a step input, or from a Brewfile in the project's source.
To specify formulae in the step configuration
1. In the **Formula name** input, put the name of the formula you want to download.
1. In the **Upgrade formula?** input, set the default behavior for previously installed packages. If the input is set to `yes`, the Step will call `brew reinstall` to upgrade them to the latest version.
1. In the **Brew install/reinstall options** input, you can set additional flags for the `brew install` or `brew reinstall` commands.
For the possible options, see [Homebrew's documentation](https://docs.brew.sh/Manpage#install-options-formulacask).
Alternatively you can install formulae using a Brewfile
1. Add a `Brewfile` to the root of the project's source. For the format of the Brewfile, see the [Homebrew Bundle documentation](https://github.com/Homebrew/homebrew-bundle#usage)
1. Set the **Use a Brewfile to install packages?** input to "yes".
1. (optional) Set the **Path to the Brewfile** input if it is not in the root of the project's source
### Useful links
- [Homebrew documentation](https://docs.brew.sh/Manpage)
### Related Steps
- [Run yarn command](https://www.bitrise.io/integrations/steps/yarn)
- [Run npm command](https://www.bitrise.io/integrations/steps/npm)
## 🧩 Get started
Add this step directly to your workflow in the [Bitrise Workflow Editor](https://devcenter.bitrise.io/steps-and-workflows/steps-and-workflows-index/).
You can also run this step directly with [Bitrise CLI](https://github.com/bitrise-io/bitrise).
## ⚙️ Configuration
Inputs
| Key | Description | Flags | Default |
| --- | --- | --- | --- |
| `packages` | Name of the formulas to install. Multiple formulas can be specified by separating them with a space, e.g. `git-lfs sqlite pipx` This input must be specified when `use_brewfile` is `no` | | |
| `upgrade` | If set to `"yes"`, the step will upgrade the defined packages by calling `brew reinstall [options] [packages]` command. Otherwise the step calls `brew install [options] [packages]`. | | `yes` |
| `upgrade_dependents` | If set to `no`, the step won't upgrade other **installed packages** that depend on the package to be installed. This helps predictability and install times, but sometimes could cause problems with existing installed packages if they are not compatible with the newly installed package (Homebrew is an evergreen package manager by design). More information is available [here](https://docs.brew.sh/FAQ#why-does-brew-upgrade-formula-or-brew-install-formula-also-upgrade-a-bunch-of-other-stuff) and [here](https://docs.brew.sh/Manpage#install-options-formulacask-). If you experience a broken package, set this input to `yes`. This input controls the `HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK` env var. | | `no` |
| `use_brewfile` | If set to `"yes"`, the step will install packages in the Brewfile by running `brew bundle`. If no Brewfile path is set, it assumes a Brewfile exists in the current directory. | | `no` |
| `brewfile_path` | If set, `use_brewfile` must be set to `yes`. Path must end with `Brewfile` | | |
| `options` | Flags to pass to the brew install/reinstall command. `brew install/reinstall [options] [packages]` | | |
| `verbose_log` | Should the step print more detailed log? | required | `no` |
Outputs
There are no outputs defined in this step
## 🙋 Contributing
We welcome [pull requests](https://github.com/bitrise-steplib/steps-brew-install/pulls) and [issues](https://github.com/bitrise-steplib/steps-brew-install/issues) against this repository.
For pull requests, work on your changes in a forked repository and use the Bitrise CLI to [run step tests locally](https://devcenter.bitrise.io/bitrise-cli/run-your-first-build/).
Learn more about developing steps:
- [Create your own step](https://devcenter.bitrise.io/contributors/create-your-own-step/)
- [Testing your Step](https://devcenter.bitrise.io/contributors/testing-and-versioning-your-steps/)