aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/test-bot.rb
diff options
context:
space:
mode:
authorXu Cheng2016-04-02 23:30:11 +0800
committerXu Cheng2016-04-03 00:01:38 +0800
commitdeed8e566c096da391a92060f19e5093ec3cd1f6 (patch)
treebadb27febdab63bfc710f955f4b268ee2aaf22e1 /Library/Homebrew/cmd/test-bot.rb
parente72ea94824abf19246610be4aadccd0ee69b2eb9 (diff)
downloadbrew-deed8e566c096da391a92060f19e5093ec3cd1f6.tar.bz2
test-bot: handle legacy formulae PR from Homebrew/homebrew
Closes Homebrew/homebrew#50635. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/cmd/test-bot.rb')
-rw-r--r--Library/Homebrew/cmd/test-bot.rb18
1 files changed, 15 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb
index 4ded71e71..91df6f15d 100644
--- a/Library/Homebrew/cmd/test-bot.rb
+++ b/Library/Homebrew/cmd/test-bot.rb
@@ -11,6 +11,8 @@
# --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 Bulid formula from legacy Homebrew/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
@@ -329,7 +331,11 @@ module Homebrew
# the right commit to BrewTestBot.
unless travis_pr
diff_start_sha1 = current_sha1
- test "brew", "pull", "--clean", @url
+ if ARGV.include?("--legacy")
+ test "brew", "pull", "--clean", "--legacy", @url
+ else
+ test "brew", "pull", "--clean", @url
+ end
diff_end_sha1 = current_sha1
end
@short_url = @url.gsub("https://github.com/", "")
@@ -747,6 +753,7 @@ module Homebrew
ARGV << "--verbose"
ARGV << "--keep-old" if ENV["UPSTREAM_BOTTLE_KEEP_OLD"]
+ ARGV << "--legacy" if ENV["UPSTREAM_BOTTLE_LEGACY"]
bottles = Dir["#{jenkins}/jobs/#{job}/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.*"]
return if bottles.empty?
@@ -767,8 +774,13 @@ module Homebrew
safe_system "brew", "update"
if pr
- pull_pr = "https://github.com/#{tap.user}/homebrew-#{tap.repo}/pull/#{pr}"
- safe_system "brew", "pull", "--clean", pull_pr
+ if ARGV.include?("--legacy")
+ pull_pr = "https://github.com/Homebrew/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
end
bottle_args = ["--merge", "--write", *Dir["*.bottle.rb"]]