1111# --junit: Generate a JUnit XML test results file.
1212# --no-bottle: Run brew install without --build-bottle
1313# --keep-old: Run brew bottle --keep-old to build new bottles for a single platform.
14+ # --legacy Bulid formula from legacy Homebrew/homebrew repo.
15+ # (TODO remove it when it's not longer necessary)
1416# --HEAD: Run brew install with --HEAD
1517# --local: Ask Homebrew to write verbose logs under ./logs/ and set HOME to ./home/
1618# --tap=<tap>: Use the git repository of the given tap
@@ -329,7 +331,11 @@ def diff_formulae(start_revision, end_revision, path, filter)
329331 # the right commit to BrewTestBot.
330332 unless travis_pr
331333 diff_start_sha1 = current_sha1
332- test "brew" , "pull" , "--clean" , @url
334+ if ARGV . include? ( "--legacy" )
335+ test "brew" , "pull" , "--clean" , "--legacy" , @url
336+ else
337+ test "brew" , "pull" , "--clean" , @url
338+ end
333339 diff_end_sha1 = current_sha1
334340 end
335341 @short_url = @url . gsub ( "https://github.com/" , "" )
@@ -747,6 +753,7 @@ def test_ci_upload(tap)
747753
748754 ARGV << "--verbose"
749755 ARGV << "--keep-old" if ENV [ "UPSTREAM_BOTTLE_KEEP_OLD" ]
756+ ARGV << "--legacy" if ENV [ "UPSTREAM_BOTTLE_LEGACY" ]
750757
751758 bottles = Dir [ "#{ jenkins } /jobs/#{ job } /configurations/axis-version/*/builds/#{ id } /archive/*.bottle*.*" ]
752759 return if bottles . empty?
@@ -767,8 +774,13 @@ def test_ci_upload(tap)
767774 safe_system "brew" , "update"
768775
769776 if pr
770- pull_pr = "https://github.com/#{ tap . user } /homebrew-#{ tap . repo } /pull/#{ pr } "
771- safe_system "brew" , "pull" , "--clean" , pull_pr
777+ if ARGV . include? ( "--legacy" )
778+ pull_pr = "https://github.com/Homebrew/homebrew/pull/#{ pr } "
779+ safe_system "brew" , "pull" , "--clean" , "--legacy" , pull_pr
780+ else
781+ pull_pr = "https://github.com/#{ tap . user } /homebrew-#{ tap . repo } /pull/#{ pr } "
782+ safe_system "brew" , "pull" , "--clean" , pull_pr
783+ end
772784 end
773785
774786 bottle_args = [ "--merge" , "--write" , *Dir [ "*.bottle.rb" ] ]
0 commit comments