Skip to content
Snippets Groups Projects
Unverified Commit 1e9710fd authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #9201 from reitermarkus/vendor-gems-update

Add `--update` option to `brew vendor-gems`.
parents 12555575 aa6a8e5c
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
# Ignore Bundler files
**/.bundle/bin
**/.bundle/cache
**/vendor/bundle/ruby/*/bundler.lock
**/vendor/bundle/ruby/*/bin
**/vendor/bundle/ruby/*/build_info/
**/vendor/bundle/ruby/*/cache
......
......@@ -18,17 +18,28 @@ module Homebrew
Install and commit Homebrew's vendored gems.
EOS
switch "--update",
description: "Update all vendored Gems to the latest version."
max_named 0
end
end
def vendor_gems
vendor_gems_args.parse
args = vendor_gems_args.parse
Homebrew.install_bundler!
ohai "cd #{HOMEBREW_LIBRARY_PATH}"
HOMEBREW_LIBRARY_PATH.cd do
if args.update?
ohai "bundle update"
safe_system "bundle", "update"
ohai "git add Gemfile.lock"
system "git", "add", "Gemfile.lock"
end
ohai "bundle install --standalone"
safe_system "bundle", "install", "--standalone"
......
......@@ -1339,6 +1339,9 @@ If no options are passed, use `origin/master` as the start commit.
Install and commit Homebrew's vendored gems.
* `--update`:
Update all vendored Gems to the latest version.
## GLOBAL CASK OPTIONS
These options are applicable to subcommands accepting a `--cask` flag and all `cask` commands.
......
......@@ -1851,6 +1851,10 @@ Use the commit at the specified \fIdate\fR as the start commit\.
.SS "\fBvendor\-gems\fR"
Install and commit Homebrew\'s vendored gems\.
.
.TP
\fB\-\-update\fR
Update all vendored Gems to the latest version\.
.
.SH "GLOBAL CASK OPTIONS"
These options are applicable to subcommands accepting a \fB\-\-cask\fR flag and all \fBcask\fR commands\.
.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment