From ffc1b4902622d2d7a285485c53ffe8f6a8f258e2 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Tue, 31 Mar 2020 11:24:10 +0200 Subject: [PATCH] pr-pull: allow to specify tap --- Library/Homebrew/dev-cmd/pr-pull.rb | 8 +++++--- docs/Manpage.md | 4 +++- manpages/brew.1 | 6 +++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/dev-cmd/pr-pull.rb b/Library/Homebrew/dev-cmd/pr-pull.rb index fe15b54c27..4860eb3bdb 100644 --- a/Library/Homebrew/dev-cmd/pr-pull.rb +++ b/Library/Homebrew/dev-cmd/pr-pull.rb @@ -37,7 +37,9 @@ module Homebrew flag "--artifact=", description: "Download artifacts with the specified name (default: bottles)." 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 :debug min_named 1 @@ -106,12 +108,12 @@ module Homebrew workflow = args.workflow || "tests.yml" artifact = args.artifact || "bottles" + tap = Tap.fetch(args.tap || "homebrew/core") 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 _, 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 check_branch tap.path, "master" diff --git a/docs/Manpage.md b/docs/Manpage.md index e503d4f954..2982e3ff79 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -910,7 +910,9 @@ repository. * `--artifact`: Download artifacts with the specified name (default: bottles). * `--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`* diff --git a/manpages/brew.1 b/manpages/brew.1 index 7501f2cf09..f182cbb489 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1164,7 +1164,11 @@ Download artifacts with the specified name (default: bottles)\. . .TP \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" Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\.