cmd/dev-cmd: misc. usage and wording fixes

This commit is contained in:
EricFromCanada 2020-04-18 12:13:43 -04:00
parent b6809f2dda
commit 9d6eb41fc5
15 changed files with 41 additions and 46 deletions

View File

@ -13,7 +13,7 @@ module Homebrew
Display Homebrew's Cellar path. *Default:* `$(brew --prefix)/Cellar`, or if
that directory doesn't exist, `$(brew --repository)/Cellar`.
If <formula> is provided, display the location in the cellar where <formula>
If <formula> is provided, display the location in the Cellar where <formula>
would be installed, without any sort of versioned directory as the last path.
EOS
end

View File

@ -13,7 +13,7 @@ module Homebrew
Display Homebrew's install path. *Default:* `/usr/local` on macOS and
`/home/linuxbrew/.linuxbrew` on Linux.
If <formula> is provided, display the location in the cellar where <formula>
If <formula> is provided, display the location in the Cellar where <formula>
is or would be installed.
EOS
end

View File

@ -29,7 +29,7 @@ module Homebrew
def log
log_args.parse
# As this command is simplifying user run commands then let's just use a
# As this command is simplifying user-run commands then let's just use a
# user path, too.
ENV["PATH"] = ENV["HOMEBREW_PATH"]

View File

@ -8,7 +8,7 @@ module Homebrew
def tap_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`tap` [<options>] <user>`/`<repo> [<URL>]
`tap` [<options>] [<user>`/`<repo>] [<URL>]
Tap a formula repository.
@ -36,8 +36,7 @@ module Homebrew
description: "Migrate tapped formulae from symlink-based to directory-based structure."
switch "--list-pinned",
description: "List all pinned taps."
switch :quiet,
description: "Suppress any warnings."
switch :quiet
switch :debug
max_named 2
end

View File

@ -16,14 +16,13 @@ module Homebrew
EOS
switch :verbose
switch :debug
min_named :formula
end
end
def unpin
unpin_args.parse
raise FormulaUnspecifiedError if args.no_named?
args.resolved_formulae.each do |f|
if f.pinned?
f.unpin

View File

@ -109,7 +109,7 @@ module Homebrew
def bump_formula_pr
bump_formula_pr_args.parse
# As this command is simplifying user run commands then let's just use a
# As this command is simplifying user-run commands then let's just use a
# user path, too.
ENV["PATH"] = ENV["HOMEBREW_PATH"]

View File

@ -22,21 +22,18 @@ module Homebrew
switch :quiet
switch :verbose
switch :debug
max_named 1
named :formula
end
end
def bump_revision
bump_revision_args.parse
# As this command is simplifying user run commands then let's just use a
# As this command is simplifying user-run commands then let's just use a
# user path, too.
ENV["PATH"] = ENV["HOMEBREW_PATH"]
formulae = args.formulae
raise FormulaUnspecifiedError if formulae.empty?
formula = formulae.first
formula = args.formulae.first
current_revision = formula.revision
if current_revision.zero?

View File

@ -10,7 +10,7 @@ module Homebrew
usage_banner <<~EOS
`mirror` <formula>
Reuploads the stable URL for a formula to Bintray to use it as a mirror.
Reupload the stable URL of a formula to Bintray for use as a mirror.
EOS
switch :verbose
switch :debug

View File

@ -11,20 +11,21 @@ module Homebrew
usage_banner <<~EOS
`pr-automerge` [<options>]
Finds pull requests that can be automatically merged using `brew pr-publish`.
Find pull requests that can be automatically merged using `brew pr-publish`.
EOS
flag "--tap=",
description: "Target repository tap (default: `homebrew/core`)"
flag "--with-label=",
description: "Pull requests must have this label (default: `ready to merge`)"
flag "--tap=",
description: "Target tap repository (default: `homebrew/core`)."
flag "--with-label=",
description: "Pull requests must have this label (default: `ready to merge`)."
comma_array "--without-labels=",
description: "Pull requests must not have these labels (default: `do not merge`, `new formula`)"
description: "Pull requests must not have these labels (default: `do not merge`, `new formula`)."
switch "--publish",
description: "Run `brew pr-publish` on matching pull requests."
switch "--ignore-failures",
description: "Include pull requests that have failing status checks."
switch :debug
switch :verbose
switch :debug
max_named 0
end
end
@ -57,8 +58,7 @@ module Homebrew
if args.publish?
safe_system "#{HOMEBREW_PREFIX}/bin/brew", "pr-publish", *pr_urls
else
ohai "Now run:"
puts " brew pr-publish \\\n #{pr_urls.join " \\\n "}"
ohai "Now run:", " brew pr-publish \\\n #{pr_urls.join " \\\n "}"
end
end
end

View File

@ -11,10 +11,11 @@ module Homebrew
usage_banner <<~EOS
`pr-publish` [<options>] <pull_request> [<pull_request> ...]
Publishes bottles for a pull request with GitHub Actions.
Requires write access to the repository.
Publish bottles for a pull request with GitHub Actions.
Requires write access to the `homebrew/core` repository.
EOS
switch :verbose
min_named 1
end
end
@ -23,8 +24,6 @@ module Homebrew
ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] = "1" unless OS.mac?
odie "You need to specify at least one pull request number!" if Homebrew.args.named.empty?
args.named.uniq.each do |arg|
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive?
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX

View File

@ -15,32 +15,32 @@ module Homebrew
`pr-pull` [<options>] <pull_request> [<pull_request> ...]
Download and publish bottles, and apply the bottle commit from a
pull request with artifacts generated from GitHub Actions.
pull request with artifacts generated by GitHub Actions.
Requires write access to the repository.
EOS
switch "--no-publish",
description: "Download the bottles, apply the bottle commit, and "\
description: "Download the bottles, apply the bottle commit and "\
"upload the bottles to Bintray, but don't publish them."
switch "--no-upload",
description: "Download the bottles and apply the bottle commit, "\
"but don't upload to Bintray."
switch "--dry-run", "-n",
switch "-n", "--dry-run",
description: "Print what would be done rather than doing it."
switch "--clean",
description: "Do not amend the commits from pull requests."
switch "--branch-okay",
description: "Do not warn if pulling to a branch besides master (useful for testing)."
switch "--resolve",
description: "When a patch fails to apply, leave in progress and allow user to resolve, instead "\
"of aborting."
flag "--workflow=",
description: "Retrieve artifacts from the specified workflow (default: tests.yml)."
flag "--artifact=",
description: "Download artifacts with the specified name (default: bottles)."
flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)."
flag "--tap=",
description: "Target repository tap (default: homebrew/core)."
description: "When a patch fails to apply, leave in progress and allow user to resolve, "\
"instead of aborting."
flag "--workflow=",
description: "Retrieve artifacts from the specified workflow (default: tests.yml)."
flag "--artifact=",
description: "Download artifacts with the specified name (default: bottles)."
flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)."
flag "--tap=",
description: "Target tap repository (default: homebrew/core)."
switch :verbose
switch :debug
min_named 1

View File

@ -12,6 +12,7 @@ module Homebrew
Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
EOS
min_named 1
end
end

View File

@ -22,8 +22,8 @@ module Homebrew
Get a patch from a GitHub commit or pull request and apply it to Homebrew.
Optionally, publish updated bottles for any formulae changed by the patch.
Each <patch> may be the number of a pull request in `homebrew/core`, the URL of any pull request
or commit on GitHub.
Each <patch> may be the number of a pull request in `homebrew/core`
or the URL of any pull request or commit on GitHub.
EOS
switch "--bump",
description: "For one-formula PRs, automatically reword commit message to our preferred format."

View File

@ -26,6 +26,7 @@ module Homebrew
switch :verbose
switch :debug
conflicts "--git", "--patch"
min_named :formula
end
end
@ -33,7 +34,6 @@ module Homebrew
unpack_args.parse
formulae = args.formulae
raise FormulaUnspecifiedError if formulae.empty?
if dir = args.destdir
unpack_dir = Pathname.new(dir).expand_path

View File

@ -65,7 +65,7 @@ If no search term is provided, all locally available formulae are listed.
## OFFICIAL EXTERNAL COMMANDS
### `cask` <subcommand>:
### `cask` <subcommand>
Install macOS applications distributed as binaries. See `brew-cask`(1).