diff options
| author | Mike McQuaid | 2014-11-23 14:11:46 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-11-23 14:11:46 +0000 |
| commit | 00f064410660463f00bcd58d1683e05ab9bfc83c (patch) | |
| tree | 0f1a3b837a3f82819d2d8bc46674ed0bb54a8462 | |
| parent | c616fe737f2d73d3f17be71693afc38c2a195b07 (diff) | |
| download | brew-00f064410660463f00bcd58d1683e05ab9bfc83c.tar.bz2 | |
test-bot: improve tap building.
- allow using (UPSTREAM_)GIT_URL to find the tap name
- push bottles to a remote based on the tap name
| -rw-r--r-- | Library/Homebrew/cmd/test-bot.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb index c9a2bbd7f..36b73b626 100644 --- a/Library/Homebrew/cmd/test-bot.rb +++ b/Library/Homebrew/cmd/test-bot.rb @@ -546,6 +546,13 @@ module Homebrew def test_bot tap = ARGV.value('tap') + git_url = ENV['UPSTREAM_GIT_URL'] || ENV['GIT_URL'] + if !tap && git_url + # Also can get tap from Jenkins GIT_URL. + /([\w-]+\/homebrew-[\w-]+)/ =~ git_url + tap = $1 + end + if Pathname.pwd == HOMEBREW_PREFIX and ARGV.include? "--cleanup" odie 'cannot use --cleanup from HOMEBREW_PREFIX as it will delete all output.' end @@ -603,7 +610,9 @@ module Homebrew ENV["GIT_AUTHOR_EMAIL"] = ENV["GIT_COMMITTER_EMAIL"] safe_system "brew", "bottle", "--merge", "--write", *Dir["*.bottle.rb"] - remote = "git@github.com:BrewTestBot/homebrew.git" + remote_repo = tap ? tap.gsub("/", "-") : "homebrew" + + remote = "git@github.com:BrewTestBot/#{remote_repo}.git" tag = pr ? "pr-#{pr}" : "testing-#{number}" safe_system "git", "push", "--force", remote, "master:master", ":refs/tags/#{tag}" |
