How to change brew core from mirror to official?

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

Can you add the option to use Brew v2.6.2, since they decided that they hate their users so much that they removed brew switch?

Hello @edward_8 :wave:

Currently we have a static version of Brew on the Bitrise VM-s, which by default cannot be modified, only via the script step that @viktorbenei mentioned. :slight_smile:

Howdy,

It looks like the mirror is now a month behind the official brew core - most recent commit on mirror is June 22nd.

Is this intentional, or is something broken here? Obviously I don’t expect up-to-the-minute updates, but a daily sync seems reasonable.

Hello @kielo :wave:

We have weekly updates on our stacks by default, in case something warrants a more immediate response. Some things might not get updated as soon as a new version is out, as we have to prioritize, but I’ll notify the developers to look into Brew :slight_smile:

Hello, @viktorbenei

Formula: dependency-check — Homebrew Formulae

I tried the two samples you provided and it’s still not allowing me to get the 9.0.2 version of dependency-check. I am still getting the 9.0.0 version and my team really needs to be on 9.0.2 right now.