Skip to content
Snippets Groups Projects
Commit 591ef254 authored by Xu Cheng's avatar Xu Cheng
Browse files

pull: fallback to old BrewTestBot git repo when necessary

parent deed8e56
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,16 @@ module Homebrew
bottle_branch = "pull-bottle-#{issue}"
"https://github.com/BrewTestBot/homebrew-#{tap.repo}/compare/homebrew:master...pr-#{issue}"
end
curl "--silent", "--fail", "-o", "/dev/null", "-I", bottle_commit_url
bottle_commit_fallbacked = false
begin
curl "--silent", "--fail", "-o", "/dev/null", "-I", bottle_commit_url
rescue ErrorDuringExecution
raise if !ARGV.include?("--legacy") || bottle_commit_fallbacked
bottle_commit_url = "https://github.com/BrewTestBot/homebrew/compare/homebrew:master...pr-#{issue}"
bottle_commit_fallbacked = true
retry
end
safe_system "git", "checkout", "-B", bottle_branch, revision
pull_patch bottle_commit_url
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment