Homebrew、Homebrew Cask、Mac App Store、WhaleBrew、Visual Studioコードからの非普通の依存関係のバンドラー。
依存関係をインストールするためのHomeBrew(MacOSまたはLinux)。
Homebrew Caskはオプションであり、Macアプリケーションのインストールに使用されます。
MAS-CLIはオプションであり、Mac App Storeアプリケーションのインストールに使用されます。
WhaleBrewはオプションで、クジラの画像のインストールに使用されます。
Visual Studioコードはオプションであり、Visual Studioコード拡張機能のインストールに使用されます。
brew bundle
、最初の実行時に自動的にインストールされます。
brew generate-man-completions
出力またはbrew bundle --help
のbrew bundle
セクションを参照してください - ヘルプ。
例の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
Runが成功した後、環境を記録するためにBrewfile.lock.json
を作成します。将来のbrew bundle
Runが失敗した場合、 Brewfile.lock.json
の違いをデバッグして確認できます。システム間で異なるローカル環境情報が含まれている可能性があるため、マルチユーザーリポジトリのバージョン制御にコミットする価値はありません。
export HOMEBREW_BUNDLE_NO_LOCK=1
を使用して環境変数を設定するか、コマンドライン引数brew bundle --no-lock
を使用して環境変数を設定して、 Brewfile.lock.json
ファイルの生成を無効にします。
brew bundle
現在、Homebrew、Homebrew Cask、Mac App Store、WhaleBrew、Visual Studioコードをサポートしています。
私たちは、他のインストーラー/チェッカー/ダンパーの貢献に興味がありますが、彼らは次のことをしなければなりません。
Brewfile
に保存できる形式にダンプできますsudo
が必要ありません注:これらの基準に基づいて、たとえばWhaleBrewを受け入れません(ただし、削除する計画はありません)。
bundle install && bundle exec rspec
。構文の糸くずはbrew style homebrew/bundle
で実行できます。
Copyright(c)Homebrew MaintenersとAndrew Nesbitt。詳細については、ライセンスを参照してください。