bump-revision: allow multiple formulae to be specified

This commit is contained in:
Dawid Dziurla 2020-08-15 10:43:29 +02:00
parent 7d78949479
commit 36f3e09669
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B
3 changed files with 55 additions and 54 deletions

View File

@ -9,7 +9,7 @@ module Homebrew
def bump_revision_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`bump-revision` [<options>] <formula>
`bump-revision` [<options>] <formula> [<formula> ...]
Create a commit to increment the revision of <formula>. If no revision is
present, "revision 1" will be added.
@ -19,7 +19,7 @@ module Homebrew
flag "--message=",
description: "Append <message> to the default commit message."
named :formula
min_named :formula
end
end
@ -30,7 +30,7 @@ module Homebrew
# user path, too.
ENV["PATH"] = ENV["HOMEBREW_PATH"]
formula = args.formulae.first
args.formulae.each do |formula|
current_revision = formula.revision
if current_revision.zero?
@ -91,3 +91,4 @@ module Homebrew
end
end
end
end

View File

@ -865,7 +865,7 @@ nor vice versa. It must use whichever style specification the formula already us
* `-f`, `--force`:
Ignore duplicate open PRs. Remove all mirrors if --mirror= was not specified.
### `bump-revision` [*`options`*] *`formula`*
### `bump-revision` [*`options`*] *`formula`* [*`formula`* ...]
Create a commit to increment the revision of *`formula`*. If no revision is
present, "revision 1" will be added.

View File

@ -1210,7 +1210,7 @@ Specify the new git commit \fIrevision\fR corresponding to the specified \fItag\
\fB\-f\fR, \fB\-\-force\fR
Ignore duplicate open PRs\. Remove all mirrors if \-\-mirror= was not specified\.
.
.SS "\fBbump\-revision\fR [\fIoptions\fR] \fIformula\fR"
.SS "\fBbump\-revision\fR [\fIoptions\fR] \fIformula\fR [\fIformula\fR \.\.\.]"
Create a commit to increment the revision of \fIformula\fR\. If no revision is present, "revision 1" will be added\.
.
.TP