pull: Remove --bottle flag

- Muscle memory is a thing, as is relying heavily on one's shell
  history. Now that the Jenkins runners are gone, `brew pull --bottle`
  no longer works. This removes the option. If maintainers are confused,
  they should [look at recent changes to the
  docs](https://docs.brew.sh/Brew-Test-Bot-For-Core-Contributors#bottling),
  or ask in Slack.
- An earlier iteration of this showed a deprecation warning and a link
  to the docs, but when an option no longer physically works it's a bit
  late for deprecation *warnings*.
- This also fixes a `brew style` warning from futher up in the file.

pull: Appease RuboCop
This commit is contained in:
Issy Long 2020-04-11 13:41:59 +01:00
parent 850a84ea1c
commit 3e2f183c60
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
3 changed files with 5 additions and 28 deletions

View File

@ -37,8 +37,6 @@ module Homebrew
Each <patch> may be the number of a pull request in `homebrew/core`, the URL of any pull request
or commit on GitHub or a "https://jenkins.brew.sh/job/..." testing job URL.
EOS
switch "--bottle",
description: "Handle bottles, pulling the bottle-update commit and publishing files on Bintray."
switch "--bump",
description: "For one-formula PRs, automatically reword commit message to our preferred format."
switch "--clean",
@ -105,7 +103,6 @@ module Homebrew
end
_, testing_job = *testing_match
url = "https://github.com/Homebrew/homebrew-#{tap.repo}/compare/master...BrewTestBot:testing-#{testing_job}"
odie "--bottle is required for testing job URLs!" unless args.bottle?
elsif (api_match = arg.match HOMEBREW_PULL_API_REGEX)
_, user, repo, issue = *api_match
url = "https://github.com/#{user}/#{repo}/pull/#{issue}"
@ -117,7 +114,7 @@ module Homebrew
odie "Not a GitHub pull request or commit: #{arg}"
end
odie "No pull request detected!" if !testing_job && args.bottle? && issue.nil?
odie "No pull request detected!" if !testing_job && issue.nil?
if tap
tap.install unless tap.installed?
@ -176,25 +173,11 @@ module Homebrew
next
end
if f.stable
stable_urls = [f.stable.url] + f.stable.mirrors
stable_urls.grep(%r{^https://dl.bintray.com/homebrew/mirror/}) do |mirror_url|
check_bintray_mirror(f.full_name, mirror_url)
end
end
next unless f.stable
if args.bottle?
if f.bottle_unneeded?
ohai "#{f}: skipping unneeded bottle."
elsif f.bottle_disabled?
ohai "#{f}: skipping disabled bottle: #{f.bottle_disable_reason}"
else
fetch_bottles = true
end
else
next unless f.bottle_defined?
opoo "#{f.full_name} has a bottle: do you need to update it with --bottle?"
stable_urls = [f.stable.url] + f.stable.mirrors
stable_urls.grep(%r{^https://dl.bintray.com/homebrew/mirror/}) do |mirror_url|
check_bintray_mirror(f.full_name, mirror_url)
end
end

View File

@ -927,8 +927,6 @@ Each *`patch`* may be the number of a pull request in `homebrew/core`, the URL o
any pull request or commit on GitHub or a "https://jenkins.brew.sh/job/..."
testing job URL.
* `--bottle`:
Handle bottles, pulling the bottle-update commit and publishing files on Bintray.
* `--bump`:
For one-formula PRs, automatically reword commit message to our preferred format.
* `--clean`:

View File

@ -1180,10 +1180,6 @@ Get a patch from a GitHub commit or pull request and apply it to Homebrew\. Opti
Each \fIpatch\fR may be the number of a pull request in \fBhomebrew/core\fR, the URL of any pull request or commit on GitHub or a "https://jenkins\.brew\.sh/job/\.\.\." testing job URL\.
.
.TP
\fB\-\-bottle\fR
Handle bottles, pulling the bottle\-update commit and publishing files on Bintray\.
.
.TP
\fB\-\-bump\fR
For one\-formula PRs, automatically reword commit message to our preferred format\.
.