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)。有關詳細信息,請參見許可證。