bump-formula-pr: add --online
switch for brew audit
This commit is contained in:
parent
adb9922eda
commit
7d29054cf2
@ -42,6 +42,8 @@ module Homebrew
|
|||||||
description: "Don't run `brew audit` before opening the PR."
|
description: "Don't run `brew audit` before opening the PR."
|
||||||
switch "--strict",
|
switch "--strict",
|
||||||
description: "Run `brew audit --strict` before opening the PR."
|
description: "Run `brew audit --strict` before opening the PR."
|
||||||
|
switch "--online",
|
||||||
|
description: "Run `brew audit --online` before opening the PR."
|
||||||
switch "--no-browse",
|
switch "--no-browse",
|
||||||
description: "Print the pull request URL instead of opening in a browser."
|
description: "Print the pull request URL instead of opening in a browser."
|
||||||
switch "--no-fork",
|
switch "--no-fork",
|
||||||
@ -71,6 +73,7 @@ module Homebrew
|
|||||||
|
|
||||||
conflicts "--dry-run", "--write"
|
conflicts "--dry-run", "--write"
|
||||||
conflicts "--no-audit", "--strict"
|
conflicts "--no-audit", "--strict"
|
||||||
|
conflicts "--no-audit", "--online"
|
||||||
conflicts "--url", "--tag"
|
conflicts "--url", "--tag"
|
||||||
max_named 1
|
max_named 1
|
||||||
end
|
end
|
||||||
@ -440,11 +443,14 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def run_audit(formula, alias_rename, old_contents, args:)
|
def run_audit(formula, alias_rename, old_contents, args:)
|
||||||
|
audit_args = []
|
||||||
|
audit_args << "--strict" if args.strict?
|
||||||
|
audit_args << "--online" if args.online?
|
||||||
if args.dry_run?
|
if args.dry_run?
|
||||||
if args.no_audit?
|
if args.no_audit?
|
||||||
ohai "Skipping `brew audit`"
|
ohai "Skipping `brew audit`"
|
||||||
elsif args.strict?
|
elsif audit_args.present?
|
||||||
ohai "brew audit --strict #{formula.path.basename}"
|
ohai "brew audit #{audit_args.join(" ")} #{formula.path.basename}"
|
||||||
else
|
else
|
||||||
ohai "brew audit #{formula.path.basename}"
|
ohai "brew audit #{formula.path.basename}"
|
||||||
end
|
end
|
||||||
@ -454,8 +460,8 @@ module Homebrew
|
|||||||
failed_audit = false
|
failed_audit = false
|
||||||
if args.no_audit?
|
if args.no_audit?
|
||||||
ohai "Skipping `brew audit`"
|
ohai "Skipping `brew audit`"
|
||||||
elsif args.strict?
|
elsif audit_args.present?
|
||||||
system HOMEBREW_BREW_FILE, "audit", "--strict", formula.path
|
system HOMEBREW_BREW_FILE, "audit", *audit_args, formula.path
|
||||||
failed_audit = !$CHILD_STATUS.success?
|
failed_audit = !$CHILD_STATUS.success?
|
||||||
else
|
else
|
||||||
system HOMEBREW_BREW_FILE, "audit", formula.path
|
system HOMEBREW_BREW_FILE, "audit", formula.path
|
||||||
|
@ -880,6 +880,8 @@ nor vice versa. It must use whichever style specification the formula already us
|
|||||||
Don't run `brew audit` before opening the PR.
|
Don't run `brew audit` before opening the PR.
|
||||||
* `--strict`:
|
* `--strict`:
|
||||||
Run `brew audit --strict` before opening the PR.
|
Run `brew audit --strict` before opening the PR.
|
||||||
|
* `--online`:
|
||||||
|
Run `brew audit --online` before opening the PR.
|
||||||
* `--no-browse`:
|
* `--no-browse`:
|
||||||
Print the pull request URL instead of opening in a browser.
|
Print the pull request URL instead of opening in a browser.
|
||||||
* `--no-fork`:
|
* `--no-fork`:
|
||||||
|
@ -1224,6 +1224,10 @@ Don\'t run \fBbrew audit\fR before opening the PR\.
|
|||||||
Run \fBbrew audit \-\-strict\fR before opening the PR\.
|
Run \fBbrew audit \-\-strict\fR before opening the PR\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-online\fR
|
||||||
|
Run \fBbrew audit \-\-online\fR before opening the PR\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\fB\-\-no\-browse\fR
|
\fB\-\-no\-browse\fR
|
||||||
Print the pull request URL instead of opening in a browser\.
|
Print the pull request URL instead of opening in a browser\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user