update argument handling and syntactical feedback changes
This commit is contained in:
parent
3ecb90b987
commit
9cae9f284c
@ -8,13 +8,11 @@ module Homebrew
|
||||
def bump_args
|
||||
Homebrew::CLI::Parser.new do
|
||||
usage_banner <<~EOS
|
||||
`bump` [<options>]
|
||||
`bump` [<options>] [<formula>]
|
||||
|
||||
Display out-of-date brew formulae and the latest version available.
|
||||
Also displays whether a pull request has been opened with the URL.
|
||||
EOS
|
||||
flag "--formula=",
|
||||
description: "Return results for package by name."
|
||||
flag "--limit=",
|
||||
description: "Limit number of package results returned."
|
||||
switch :verbose
|
||||
@ -25,7 +23,7 @@ module Homebrew
|
||||
def bump
|
||||
args = bump_args.parse
|
||||
|
||||
requested_formula = args.formula
|
||||
requested_formula = args.formulae.first.to_s
|
||||
requested_limit = args.limit.to_i if args.limit.present?
|
||||
|
||||
raise FormulaUnavailableError, requested_formula if requested_formula && !validate_formula(requested_formula)
|
||||
|
@ -11,7 +11,7 @@ describe "brew bump" do
|
||||
it "returns data for valid specified formula" do
|
||||
install_test_formula "testball"
|
||||
|
||||
expect { brew "bump", "--formula=testball" }
|
||||
expect { brew "bump", "testball" }
|
||||
.to output.to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
.and be_a_success
|
||||
|
@ -49,6 +49,7 @@ module Repology
|
||||
end
|
||||
|
||||
puts "#{outdated_packages.size} outdated #{"package".pluralize(outdated_packages.size)} found"
|
||||
puts
|
||||
|
||||
outdated_packages
|
||||
end
|
||||
@ -90,7 +91,7 @@ module Repology
|
||||
pull_requests = GitHub.fetch_pull_requests(formula_name, tap_full_name, state: "open")
|
||||
|
||||
if pull_requests.try(:any?)
|
||||
pull_requests = pull_requests.map { |pr| "#{pr["title"]} (#{Formatter.url(pr["url"])})" }.join(", ")
|
||||
pull_requests = pull_requests.map { |pr| "#{pr["title"]} (#{Formatter.url(pr["html_url"])})" }.join(", ")
|
||||
end
|
||||
|
||||
pull_requests = "None" if pull_requests.empty?
|
||||
|
@ -727,13 +727,11 @@ at its original value, while `--no-rebuild` will remove it.
|
||||
* `--root-url`:
|
||||
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
|
||||
|
||||
### `bump` [*`options`*]
|
||||
### `bump` [*`options`*] [*`formula`*]
|
||||
|
||||
Display out-of-date brew formulae and the latest version available. Also
|
||||
displays whether a pull request has been opened with the URL.
|
||||
|
||||
* `--formula`:
|
||||
Return results for package by name.
|
||||
* `--limit`:
|
||||
Limit number of package results returned.
|
||||
|
||||
@ -1219,21 +1217,17 @@ flags which will help find keg-only dependencies like `openssl`, `icu4c`, etc.
|
||||
Read the `Brewfile` from this location. Use `--file=-` to pipe to stdin/stdout.
|
||||
* `--global`:
|
||||
Read the `Brewfile` from `~/.Brewfile`.
|
||||
* `-v`, `--verbose`:
|
||||
`install` prints output from commands as they are run. `check` lists all missing dependencies.
|
||||
* `--no-upgrade`:
|
||||
`install` won't run `brew upgrade` on outdated dependencies. Note they may still be upgraded by `brew install` if needed.
|
||||
* `-f`, `--force`:
|
||||
`dump` overwrites an existing `Brewfile`. `cleanup` actually performs its cleanup operations.
|
||||
* `--no-lock`:
|
||||
`install` won't output a `Brewfile.lock.json`.
|
||||
* `--all`:
|
||||
`list` all dependencies.
|
||||
* `--formula`:
|
||||
* `--brews`:
|
||||
`list` Homebrew dependencies.
|
||||
* `--cask`:
|
||||
* `--casks`:
|
||||
`list` Homebrew Cask dependencies.
|
||||
* `--tap`:
|
||||
* `--taps`:
|
||||
`list` tap dependencies.
|
||||
* `--mas`:
|
||||
`list` Mac App Store dependencies.
|
||||
@ -1306,8 +1300,6 @@ and Linux workers.
|
||||
use the `git` repository of the given tap. Defaults to the core tap for syntax checking.
|
||||
* `--fail-fast`:
|
||||
immediately exit on a failing step.
|
||||
* `-v`, `--verbose`:
|
||||
print test step output in real time. Has the side effect of passing output as raw bytes instead of re-encoding in UTF-8.
|
||||
* `--test-default-formula`:
|
||||
use a default testing formula when not building a tap and no other formulae are specified.
|
||||
* `--bintray-org`:
|
||||
|
@ -960,14 +960,10 @@ When passed with \fB\-\-write\fR, a new commit will not generated after writing
|
||||
\fB\-\-root\-url\fR
|
||||
Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\.
|
||||
.
|
||||
.SS "\fBbump\fR [\fIoptions\fR]"
|
||||
.SS "\fBbump\fR [\fIoptions\fR] [\fIformula\fR]"
|
||||
Display out\-of\-date brew formulae and the latest version available\. Also displays whether a pull request has been opened with the URL\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-formula\fR
|
||||
Return results for package by name\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-limit\fR
|
||||
Limit number of package results returned\.
|
||||
.
|
||||
@ -1576,18 +1572,10 @@ Read the \fBBrewfile\fR from this location\. Use \fB\-\-file=\-\fR to pipe to st
|
||||
Read the \fBBrewfile\fR from \fB~/\.Brewfile\fR\.
|
||||
.
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-verbose\fR
|
||||
\fBinstall\fR prints output from commands as they are run\. \fBcheck\fR lists all missing dependencies\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-no\-upgrade\fR
|
||||
\fBinstall\fR won\'t run \fBbrew upgrade\fR on outdated dependencies\. Note they may still be upgraded by \fBbrew install\fR if needed\.
|
||||
.
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-force\fR
|
||||
\fBdump\fR overwrites an existing \fBBrewfile\fR\. \fBcleanup\fR actually performs its cleanup operations\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-no\-lock\fR
|
||||
\fBinstall\fR won\'t output a \fBBrewfile\.lock\.json\fR\.
|
||||
.
|
||||
@ -1596,15 +1584,15 @@ Read the \fBBrewfile\fR from \fB~/\.Brewfile\fR\.
|
||||
\fBlist\fR all dependencies\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-formula\fR
|
||||
\fB\-\-brews\fR
|
||||
\fBlist\fR Homebrew dependencies\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-cask\fR
|
||||
\fB\-\-casks\fR
|
||||
\fBlist\fR Homebrew Cask dependencies\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-tap\fR
|
||||
\fB\-\-taps\fR
|
||||
\fBlist\fR tap dependencies\.
|
||||
.
|
||||
.TP
|
||||
@ -1700,10 +1688,6 @@ use the \fBgit\fR repository of the given tap\. Defaults to the core tap for syn
|
||||
immediately exit on a failing step\.
|
||||
.
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-verbose\fR
|
||||
print test step output in real time\. Has the side effect of passing output as raw bytes instead of re\-encoding in UTF\-8\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-test\-default\-formula\fR
|
||||
use a default testing formula when not building a tap and no other formulae are specified\.
|
||||
.
|
||||
|
Loading…
x
Reference in New Issue
Block a user