pr-pull: allow to specify tap

This commit is contained in:
Dawid Dziurla 2020-03-31 11:24:10 +02:00
parent 3b4c2eecd2
commit ffc1b49026
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B
3 changed files with 13 additions and 5 deletions

View File

@ -37,7 +37,9 @@ module Homebrew
flag "--artifact=", flag "--artifact=",
description: "Download artifacts with the specified name (default: bottles)." description: "Download artifacts with the specified name (default: bottles)."
flag "--bintray-org=", flag "--bintray-org=",
description: "Upload to the specified Bintray organisation." description: "Upload to the specified Bintray organisation (default: homebrew)."
flag "--tap=",
description: "Target repository tap (default: homebrew/core)."
switch :verbose switch :verbose
switch :debug switch :debug
min_named 1 min_named 1
@ -106,12 +108,12 @@ module Homebrew
workflow = args.workflow || "tests.yml" workflow = args.workflow || "tests.yml"
artifact = args.artifact || "bottles" artifact = args.artifact || "bottles"
tap = Tap.fetch(args.tap || "homebrew/core")
args.named.each do |arg| args.named.each do |arg|
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive? arg = "#{tap.default_remote}/pull/#{arg}" if arg.to_i.positive?
url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX url_match = arg.match HOMEBREW_PULL_OR_COMMIT_URL_REGEX
_, user, repo, pr = *url_match _, user, repo, pr = *url_match
tap = Tap.fetch(user, repo) if repo.match?(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX)
odie "Not a GitHub pull request: #{arg}" unless pr odie "Not a GitHub pull request: #{arg}" unless pr
check_branch tap.path, "master" check_branch tap.path, "master"

View File

@ -910,7 +910,9 @@ repository.
* `--artifact`: * `--artifact`:
Download artifacts with the specified name (default: bottles). Download artifacts with the specified name (default: bottles).
* `--bintray-org`: * `--bintray-org`:
Upload to the specified Bintray organisation. Upload to the specified Bintray organisation (default: homebrew).
* `--tap`:
Target repository tap (default: homebrew/core).
### `prof` *`command`* ### `prof` *`command`*

View File

@ -1164,7 +1164,11 @@ Download artifacts with the specified name (default: bottles)\.
. .
.TP .TP
\fB\-\-bintray\-org\fR \fB\-\-bintray\-org\fR
Upload to the specified Bintray organisation\. Upload to the specified Bintray organisation (default: homebrew)\.
.
.TP
\fB\-\-tap\fR
Target repository tap (default: homebrew/core)\.
. .
.SS "\fBprof\fR \fIcommand\fR" .SS "\fBprof\fR \fIcommand\fR"
Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\. Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\.