aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2014-11-23 14:11:46 +0000
committerMike McQuaid2014-11-23 14:11:46 +0000
commitcafbca0ff0335870f27efdc1d0397943be985a7a (patch)
tree986cce0b9e34779b20af18fc3be57be12a622c35 /Library/Homebrew
parent088f7c1f64b9074b50d4404baf0c11cc5b2f9657 (diff)
downloadhomebrew-cafbca0ff0335870f27efdc1d0397943be985a7a.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
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/test-bot.rb11
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}"