test-bot: remove support for legacy Homebrew repo. (#287)

We're not really getting any more PRs here and this code makes this file
harder to follow and refactor.
This commit is contained in:
Mike McQuaid 2016-05-28 18:48:51 +01:00
parent 9edb1a7a87
commit f946693b56

View File

@ -11,8 +11,6 @@
# --junit: Generate a JUnit XML test results file.
# --no-bottle: Run brew install without --build-bottle.
# --keep-old: Run brew bottle --keep-old to build new bottles for a single platform.
# --legacy Build formula from legacy Homebrew/legacy-homebrew repo.
# (TODO remove it when it's not longer necessary)
# --HEAD: Run brew install with --HEAD.
# --local: Ask Homebrew to write verbose logs under ./logs/ and set HOME to ./home/.
# --tap=<tap>: Use the git repository of the given tap.
@ -342,11 +340,7 @@ module Homebrew
# the right commit to BrewTestBot.
unless travis_pr
diff_start_sha1 = current_sha1
if ARGV.include?("--legacy")
test "brew", "pull", "--clean", "--legacy", @url
else
test "brew", "pull", "--clean", @url
end
test "brew", "pull", "--clean", @url
diff_end_sha1 = current_sha1
end
@short_url = @url.gsub("https://github.com/", "")
@ -789,7 +783,6 @@ module Homebrew
ENV["HUDSON_COOKIE"] = nil
ARGV << "--verbose"
ARGV << "--legacy" if ENV["UPSTREAM_BOTTLE_LEGACY"]
bottles = Dir["#{jenkins}/jobs/#{job}/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.*"]
return if bottles.empty?
@ -810,13 +803,8 @@ module Homebrew
safe_system "brew", "update"
if pr
if ARGV.include?("--legacy")
pull_pr = "https://github.com/Homebrew/legacy-homebrew/pull/#{pr}"
safe_system "brew", "pull", "--clean", "--legacy", pull_pr
else
pull_pr = "https://github.com/#{tap.user}/homebrew-#{tap.repo}/pull/#{pr}"
safe_system "brew", "pull", "--clean", pull_pr
end
pull_pr = "https://github.com/#{tap.user}/homebrew-#{tap.repo}/pull/#{pr}"
safe_system "brew", "pull", "--clean", pull_pr
end
json_files = Dir.glob("*.bottle.json")