Skip to content

Latest commit

 

History

History
107 lines (71 loc) · 3 KB

File metadata and controls

107 lines (71 loc) · 3 KB

Homebrew

https://brew.sh/

Homebrew is the best package manager for Mac.

The guy who wrote this didn't get hired by Google ffs... who cares about old bubble sort comp-sci bullshit. Seriously.

Install

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Package Lists

All the packages I use on Mac are stored in the DevOps-Bash-tools repo.

Core Packages - core build packages and utils needed by almost everything

Desktop Packages - long list of cool & techie packages for Mac

Desktop Casks - major GUI 3rd party apps

Desktop Taps - more 3rd party apps

Package Management

brew install "$package"
brew reinstall "$package"
brew remove "$package"

Info

brew info "$package"

List files for package:

brew ls --verbose "$package"

Environment Variables

https://docs.brew.sh/Manpage#environment

Some environment variables to take note of:

  • HOMEBREW_CLEANUP_MAX_AGE_DAYS - 120 by default, you might want to reduce this
  • HOMEBREW_DISPLAY_INSTALL_TIMES - if set, print install times for each formula at the end of the run

Some ones you might want to use in Mobile CI/CD builds:

  • HOMEBREW_DEBUG
  • HOMEBREW_VERBOSE
  • HOMEBREW_VERBOSE_USING_DOTS - prints a . no more than once a minute to avoid long-running Homebrew commands being killed due to no output
  • HOMEBREW_NO_COLOR
  • HOMEBREW_NO_ANALYTICS - don't send Analytics
  • HOMEBREW_NO_AUTOREMOVE
  • HOMEBREW_NO_AUTO_UPDATE (VM will be discarded at end of build anyway)
  • HOMEBREW_NO_INSTALL_CLEANUP
  • HOMEBREW_NO_INSTALL_UPGRADE
  • HOMEBREW_NO_CLEANUP_FORMULAE
  • HOMEBREW_NO_BOOTSNAP - do not use Bootsnap to speed up repeated brew calls
  • HOMEBREW_NO_INSECURE_REDIRECT

The usual HTTP Proxy environment variables of http_proxy, https_proxy and no_proxy also work.

Troubleshooting

Fix SSL of a package:

brew_fix_openssl_dependencies.sh

Memes

Imported Package Tariffs

Imported Package Tariffs

Partial port from private Knowledge Base page 2013+