Bundler for Homebrew,Homebrew Cask,Mac App Store,Whalebrew和Visual Studio Code的非Ruby依赖关系。
用于安装依赖项的Homebrew(在MacOS或Linux上)。
Homebrew Cask是可选的,用于安装Mac应用程序。
MAS-CLI是可选的,用于安装Mac App Store应用程序。
鲸鱼是可选的,用于安装鲸鱼图像。
Visual Studio代码是可选的,用于安装Visual Studio代码扩展。
首次运行时将自动安装brew bundle
。
请参阅brew generate-man-completions
输出或酿造捆绑包的brew bundle
包部分brew bundle --help
。
一个示例Brewfile
:
# 'brew tap'
tap "homebrew/cask"
# 'brew tap' with custom Git URL
tap "user/tap-repo" , "https://[email protected]/user/homebrew-tap-repo.git"
# 'brew tap' with arguments
tap "user/tap-repo" , "https://[email protected]/user/homebrew-tap-repo.git" , force_auto_update : true
# set arguments for all 'brew install --cask' commands
cask_args appdir : "~/Applications" , require_sha : true
# 'brew install'
brew "imagemagick"
# 'brew install --with-rmtp', 'brew link --overwrite', 'brew services restart' on version changes
brew "denji/nginx/nginx-full" , link : :overwrite , args : [ "with-rmtp" ] , restart_service : :changed
# 'brew install', always 'brew services restart', 'brew link', 'brew unlink mysql' (if it is installed)
brew "[email protected]" , restart_service : true , link : true , conflicts_with : [ "mysql" ]
# install only on specified OS
brew "gnupg" if OS . mac?
brew "glibc" if OS . linux?
# 'brew install --cask'
cask "google-chrome"
# 'brew install --cask --appdir=~/my-apps/Applications'
cask "firefox" , args : { appdir : "~/my-apps/Applications" }
# bypass Gatekeeper protections (NOT RECOMMENDED)
cask "firefox" , args : { no_quarantine : true }
# always upgrade auto-updated or unversioned cask to latest version even if already installed
cask "opera" , greedy : true
# 'brew install --cask' only if '/usr/libexec/java_home --failfast' fails
cask "java" unless system "/usr/libexec/java_home" , "--failfast"
# 'mas install'
mas "1Password" , id : 443_987_910
# 'whalebrew install'
whalebrew "whalebrew/wget"
# 'vscode --install-extension'
vscode "GitHub.codespaces"
Homebrew是滚动发布程序包管理器,因此它不支持安装任意旧版本的软件。如果您的软件需要特定的固定版本,请考虑Brewfile
中的whalebrew
线以安装Docker容器。
成功进行brew bundle
包后,它创建了一个Brewfile.lock.json
来记录环境。如果未来的brew bundle
运行失败,则可以检查Brewfile.lock.json
之间的差异。由于它可以包含在系统之间有所不同的本地环境信息,因此不值得承诺对多用户存储库的版本控制。
通过用export HOMEBREW_BUNDLE_NO_LOCK=1
或使用命令行参数brew bundle --no-lock
来设置环境变量,禁用Brewfile.lock.json
文件的生成。
brew bundle
目前支持自制,自制桶,Mac App Store,Whalebrew和Visual Studio Code。
我们对其他安装程序/检查器/垃圾箱的贡献感兴趣,但他们必须:
Brewfile
中的格式sudo
安装注意:根据这些标准,我们不会接受例如鲸鱼(但没有计划删除它。)
可以使用bundle install && bundle exec rspec
进行测试。语法覆盖物可以使用brew style homebrew/bundle
进行运行。
版权(C)自制维护者和安德鲁·内斯比特(Andrew Nesbitt)。有关详细信息,请参见许可证。