For stability and for increased build performance by default the macOS VMs have brew
installed but the main source is changed from the official GitHub - Homebrew/homebrew-core: 🍻 Default formulae for the missing package manager for macOS (or Linux) to the Bitrise maintained mirror GitHub - bitrise-io/homebrew-core: homebrew-core (and similarly for homebrew cask changed from GitHub - Homebrew/homebrew-cask: 🍻 A CLI workflow for the administration of macOS applications distributed as binaries to GitHub - bitrise-io/homebrew-cask: homebrew-cask ).
The mirror is updated frequently but it follows the official repo with a delay.
IMPORTANT NOTE: GitHub throttles homebrew repos, which might easily make some workflows flaky. You should only change back to the official brew core formulae repo if you really need to!
If for some reason you’d need a brew formulae that’s so new that it’s not available in the Bitrise mirror, or if you’d need a newer version of the formulae that’s not yet available in the Bitrise mirror you can use a Script step to change the brew formulae source repository from the Bitrise mirror back to the official one:
#!/usr/bin/env bash
set -ex
cd "$(brew --repository)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
brew update
brew install THE-FORMULAE-YOU-WANT-TO-INSTALL
# or if you just want to upgrade
brew upgrade THE-FORMULAE-YOU-WANT-TO-UPGRADE
This script changes the source of the main brew repository. If you need a newer formulae from brew cask you can use this Script instead:
#!/usr/bin/env bash
set -ex
cd "$(brew --repository)/Library/Taps/homebrew/homebrew-cask"
git remote set-url origin https://github.com/Homebrew/homebrew-cask.git
brew update
brew install THE-FORMULAE-YOU-WANT-TO-INSTALL
# or if you just want to upgrade
brew upgrade THE-FORMULAE-YOU-WANT-TO-UPGRADE