mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Remove last Jenkins references
- remove Jenkins Testing support from `brew pull` - update reference to MacStadium Orka - remove reference to DigitalOcean
This commit is contained in:
parent
ecea0e5abd
commit
239b4c9d19
@ -11,18 +11,6 @@ require "pkg_version"
|
|||||||
require "bottle_publisher"
|
require "bottle_publisher"
|
||||||
require "formula_info"
|
require "formula_info"
|
||||||
|
|
||||||
module GitHub
|
|
||||||
module_function
|
|
||||||
|
|
||||||
# Return the corresponding test-bot user name for the given GitHub organization.
|
|
||||||
def test_bot_user(user, test_bot)
|
|
||||||
return test_bot if test_bot
|
|
||||||
return "BrewTestBot" if user.casecmp("homebrew").zero?
|
|
||||||
|
|
||||||
"#{user.capitalize}TestBot"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
@ -35,7 +23,7 @@ module Homebrew
|
|||||||
Optionally, publish updated bottles for any formulae changed by the patch.
|
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
|
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.
|
or commit on GitHub.
|
||||||
EOS
|
EOS
|
||||||
switch "--bump",
|
switch "--bump",
|
||||||
description: "For one-formula PRs, automatically reword commit message to our preferred format."
|
description: "For one-formula PRs, automatically reword commit message to our preferred format."
|
||||||
@ -50,14 +38,6 @@ module Homebrew
|
|||||||
description: "Do not warn if pulling to a branch besides master (useful for testing)."
|
description: "Do not warn if pulling to a branch besides master (useful for testing)."
|
||||||
switch "--no-pbcopy",
|
switch "--no-pbcopy",
|
||||||
description: "Do not copy anything to the system clipboard."
|
description: "Do not copy anything to the system clipboard."
|
||||||
switch "--no-publish",
|
|
||||||
description: "Do not publish bottles to Bintray."
|
|
||||||
switch "--warn-on-publish-failure",
|
|
||||||
description: "Do not exit if there's a failure publishing bottles on Bintray."
|
|
||||||
flag "--bintray-org=",
|
|
||||||
description: "Publish bottles to the specified Bintray <organisation>."
|
|
||||||
flag "--test-bot-user=",
|
|
||||||
description: "Pull the bottle block commit from the specified <user> on GitHub."
|
|
||||||
switch :verbose
|
switch :verbose
|
||||||
switch :debug
|
switch :debug
|
||||||
min_named 1
|
min_named 1
|
||||||
@ -92,18 +72,7 @@ module Homebrew
|
|||||||
|
|
||||||
args.named.each do |arg|
|
args.named.each do |arg|
|
||||||
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive?
|
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive?
|
||||||
if (testing_match = arg.match %r{/job/Homebrew.*Testing/(\d+)})
|
if (api_match = arg.match HOMEBREW_PULL_API_REGEX)
|
||||||
tap = ARGV.value("tap")
|
|
||||||
tap = if tap&.start_with?("homebrew/")
|
|
||||||
Tap.fetch("homebrew", tap.delete_prefix("homebrew/"))
|
|
||||||
elsif tap
|
|
||||||
odie "Tap option did not start with \"homebrew/\": #{tap}"
|
|
||||||
else
|
|
||||||
CoreTap.instance
|
|
||||||
end
|
|
||||||
_, testing_job = *testing_match
|
|
||||||
url = "https://github.com/Homebrew/homebrew-#{tap.repo}/compare/master...BrewTestBot:testing-#{testing_job}"
|
|
||||||
elsif (api_match = arg.match HOMEBREW_PULL_API_REGEX)
|
|
||||||
_, user, repo, issue = *api_match
|
_, user, repo, issue = *api_match
|
||||||
url = "https://github.com/#{user}/#{repo}/pull/#{issue}"
|
url = "https://github.com/#{user}/#{repo}/pull/#{issue}"
|
||||||
tap = Tap.fetch(user, repo) if repo.match?(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX)
|
tap = Tap.fetch(user, repo) if repo.match?(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX)
|
||||||
@ -114,7 +83,7 @@ module Homebrew
|
|||||||
odie "Not a GitHub pull request or commit: #{arg}"
|
odie "Not a GitHub pull request or commit: #{arg}"
|
||||||
end
|
end
|
||||||
|
|
||||||
odie "No pull request detected!" if !testing_job && issue.nil?
|
odie "No pull request detected!" if issue.blank?
|
||||||
|
|
||||||
if tap
|
if tap
|
||||||
tap.install unless tap.installed?
|
tap.install unless tap.installed?
|
||||||
@ -162,7 +131,6 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
fetch_bottles = false
|
|
||||||
changed_formulae_names.each do |name|
|
changed_formulae_names.each do |name|
|
||||||
next if Homebrew::EnvConfig.disable_load_formula?
|
next if Homebrew::EnvConfig.disable_load_formula?
|
||||||
|
|
||||||
@ -219,33 +187,7 @@ module Homebrew
|
|||||||
safe_system "git", "commit", "--amend", "--signoff", "--allow-empty", "-q", "-m", message
|
safe_system "git", "commit", "--amend", "--signoff", "--allow-empty", "-q", "-m", message
|
||||||
end
|
end
|
||||||
|
|
||||||
if fetch_bottles
|
fetch_merge_patch(url, args, issue) if merge_commit
|
||||||
bottle_commit_url = if testing_job
|
|
||||||
bottle_branch = "testing-bottle-#{testing_job}"
|
|
||||||
url
|
|
||||||
else
|
|
||||||
bottle_branch = "pull-bottle-#{issue}"
|
|
||||||
bot_username = GitHub.test_bot_user(user, args.test_bot_user)
|
|
||||||
"https://github.com/#{bot_username}/homebrew-#{tap.repo}/compare/#{user}:master...pr-#{issue}"
|
|
||||||
end
|
|
||||||
|
|
||||||
curl "--silent", "--fail", "--output", "/dev/null", "--head", bottle_commit_url
|
|
||||||
|
|
||||||
if merge_commit
|
|
||||||
fetch_merge_patch(bottle_commit_url, args, issue)
|
|
||||||
else
|
|
||||||
fetch_bottles_patch(bottle_commit_url, args, bottle_branch, branch, orig_revision)
|
|
||||||
end
|
|
||||||
BottlePublisher.new(
|
|
||||||
tap,
|
|
||||||
changed_formulae_names,
|
|
||||||
args.bintray_org,
|
|
||||||
args.no_publish?,
|
|
||||||
args.warn_on_publish_failure?,
|
|
||||||
).publish_and_check_bottles
|
|
||||||
elsif merge_commit
|
|
||||||
fetch_merge_patch(url, args, issue)
|
|
||||||
end
|
|
||||||
|
|
||||||
ohai "Patch changed:"
|
ohai "Patch changed:"
|
||||||
safe_system "git", "diff-tree", "-r", "--stat", orig_revision, end_revision
|
safe_system "git", "diff-tree", "-r", "--stat", orig_revision, end_revision
|
||||||
@ -274,15 +216,6 @@ module Homebrew
|
|||||||
Utils.popen_read("git", "rev-parse", fetched ? "FETCH_HEAD" : "HEAD").strip
|
Utils.popen_read("git", "rev-parse", fetched ? "FETCH_HEAD" : "HEAD").strip
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_bottles_patch(bottle_commit_url, args, bottle_branch, branch, orig_revision)
|
|
||||||
safe_system "git", "checkout", "--quiet", "-B", bottle_branch, orig_revision
|
|
||||||
PatchPuller.new(bottle_commit_url, args, "bottle commit").pull_patch
|
|
||||||
safe_system "git", "rebase", "--quiet", branch
|
|
||||||
safe_system "git", "checkout", "--quiet", branch
|
|
||||||
safe_system "git", "merge", "--quiet", "--ff-only", "--no-edit", bottle_branch
|
|
||||||
safe_system "git", "branch", "--quiet", "-D", bottle_branch
|
|
||||||
end
|
|
||||||
|
|
||||||
def fetch_merge_patch(url, args, issue)
|
def fetch_merge_patch(url, args, issue)
|
||||||
PatchPuller.new(url, args, "merge commit").pull_merge_commit(issue)
|
PatchPuller.new(url, args, "merge commit").pull_merge_commit(issue)
|
||||||
end
|
end
|
||||||
|
@ -72,13 +72,10 @@ Code is under the [BSD 2-clause "Simplified" License](LICENSE.txt).
|
|||||||
Documentation is under the [Creative Commons Attribution license](https://creativecommons.org/licenses/by/4.0/).
|
Documentation is under the [Creative Commons Attribution license](https://creativecommons.org/licenses/by/4.0/).
|
||||||
|
|
||||||
## Sponsors
|
## Sponsors
|
||||||
Our macOS continuous integration infrastructure is hosted by [MacStadium](https://www.macstadium.com).
|
Our macOS continuous integration infrastructure is hosted by [MacStadium's Orka](https://www.macstadium.com/customers/homebrew).
|
||||||
|
|
||||||
[](https://www.macstadium.com)
|
[](https://www.macstadium.com)
|
||||||
|
|
||||||
Our Jenkins CI installation is hosted by [DigitalOcean](https://m.do.co/c/7e39c35d5581).
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Our bottles (binary packages) are hosted by [Bintray](https://bintray.com/homebrew).
|
Our bottles (binary packages) are hosted by [Bintray](https://bintray.com/homebrew).
|
||||||
|
|
||||||
|
@ -903,8 +903,7 @@ 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.
|
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
|
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/..."
|
any pull request or commit on GitHub.
|
||||||
testing job URL.
|
|
||||||
|
|
||||||
* `--bump`:
|
* `--bump`:
|
||||||
For one-formula PRs, automatically reword commit message to our preferred format.
|
For one-formula PRs, automatically reword commit message to our preferred format.
|
||||||
@ -918,14 +917,6 @@ testing job URL.
|
|||||||
Do not warn if pulling to a branch besides master (useful for testing).
|
Do not warn if pulling to a branch besides master (useful for testing).
|
||||||
* `--no-pbcopy`:
|
* `--no-pbcopy`:
|
||||||
Do not copy anything to the system clipboard.
|
Do not copy anything to the system clipboard.
|
||||||
* `--no-publish`:
|
|
||||||
Do not publish bottles to Bintray.
|
|
||||||
* `--warn-on-publish-failure`:
|
|
||||||
Do not exit if there's a failure publishing bottles on Bintray.
|
|
||||||
* `--bintray-org`:
|
|
||||||
Publish bottles to the specified Bintray *`organisation`*.
|
|
||||||
* `--test-bot-user`:
|
|
||||||
Pull the bottle block commit from the specified *`user`* on GitHub.
|
|
||||||
|
|
||||||
### `release-notes` [*`options`*] [*`previous_tag`*] [*`end_ref`*]
|
### `release-notes` [*`options`*] [*`previous_tag`*] [*`end_ref`*]
|
||||||
|
|
||||||
|
@ -1164,7 +1164,7 @@ Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\.
|
|||||||
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\.
|
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\.
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
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\.
|
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\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-bump\fR
|
\fB\-\-bump\fR
|
||||||
@ -1190,22 +1190,6 @@ Do not warn if pulling to a branch besides master (useful for testing)\.
|
|||||||
\fB\-\-no\-pbcopy\fR
|
\fB\-\-no\-pbcopy\fR
|
||||||
Do not copy anything to the system clipboard\.
|
Do not copy anything to the system clipboard\.
|
||||||
.
|
.
|
||||||
.TP
|
|
||||||
\fB\-\-no\-publish\fR
|
|
||||||
Do not publish bottles to Bintray\.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
\fB\-\-warn\-on\-publish\-failure\fR
|
|
||||||
Do not exit if there\'s a failure publishing bottles on Bintray\.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
\fB\-\-bintray\-org\fR
|
|
||||||
Publish bottles to the specified Bintray \fIorganisation\fR\.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
\fB\-\-test\-bot\-user\fR
|
|
||||||
Pull the bottle block commit from the specified \fIuser\fR on GitHub\.
|
|
||||||
.
|
|
||||||
.SS "\fBrelease\-notes\fR [\fIoptions\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]"
|
.SS "\fBrelease\-notes\fR [\fIoptions\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]"
|
||||||
Print the merged pull requests on Homebrew/brew between two Git refs\. If no \fIprevious_tag\fR is provided it defaults to the latest tag\. If no \fIend_ref\fR is provided it defaults to \fBorigin/master\fR\.
|
Print the merged pull requests on Homebrew/brew between two Git refs\. If no \fIprevious_tag\fR is provided it defaults to the latest tag\. If no \fIend_ref\fR is provided it defaults to \fBorigin/master\fR\.
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user