mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Add --update
option to brew vendor-gems
.
This commit is contained in:
parent
125555752f
commit
aa6a8e5c13
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,6 +24,7 @@
|
|||||||
# Ignore Bundler files
|
# Ignore Bundler files
|
||||||
**/.bundle/bin
|
**/.bundle/bin
|
||||||
**/.bundle/cache
|
**/.bundle/cache
|
||||||
|
**/vendor/bundle/ruby/*/bundler.lock
|
||||||
**/vendor/bundle/ruby/*/bin
|
**/vendor/bundle/ruby/*/bin
|
||||||
**/vendor/bundle/ruby/*/build_info/
|
**/vendor/bundle/ruby/*/build_info/
|
||||||
**/vendor/bundle/ruby/*/cache
|
**/vendor/bundle/ruby/*/cache
|
||||||
|
@ -18,17 +18,28 @@ module Homebrew
|
|||||||
Install and commit Homebrew's vendored gems.
|
Install and commit Homebrew's vendored gems.
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
|
switch "--update",
|
||||||
|
description: "Update all vendored Gems to the latest version."
|
||||||
|
|
||||||
max_named 0
|
max_named 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def vendor_gems
|
def vendor_gems
|
||||||
vendor_gems_args.parse
|
args = vendor_gems_args.parse
|
||||||
|
|
||||||
Homebrew.install_bundler!
|
Homebrew.install_bundler!
|
||||||
|
|
||||||
ohai "cd #{HOMEBREW_LIBRARY_PATH}"
|
ohai "cd #{HOMEBREW_LIBRARY_PATH}"
|
||||||
HOMEBREW_LIBRARY_PATH.cd do
|
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"
|
ohai "bundle install --standalone"
|
||||||
safe_system "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.
|
Install and commit Homebrew's vendored gems.
|
||||||
|
|
||||||
|
* `--update`:
|
||||||
|
Update all vendored Gems to the latest version.
|
||||||
|
|
||||||
## GLOBAL CASK OPTIONS
|
## GLOBAL CASK OPTIONS
|
||||||
|
|
||||||
These options are applicable to subcommands accepting a `--cask` flag and all `cask` commands.
|
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"
|
.SS "\fBvendor\-gems\fR"
|
||||||
Install and commit Homebrew\'s vendored gems\.
|
Install and commit Homebrew\'s vendored gems\.
|
||||||
.
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-\-update\fR
|
||||||
|
Update all vendored Gems to the latest version\.
|
||||||
|
.
|
||||||
.SH "GLOBAL CASK OPTIONS"
|
.SH "GLOBAL CASK OPTIONS"
|
||||||
These options are applicable to subcommands accepting a \fB\-\-cask\fR flag and all \fBcask\fR commands\.
|
These options are applicable to subcommands accepting a \fB\-\-cask\fR flag and all \fBcask\fR commands\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user