aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/pull.rb
diff options
context:
space:
mode:
authorMike McQuaid2015-02-19 10:58:51 +0000
committerMike McQuaid2015-02-19 11:06:21 +0000
commit5c7c7a4ce66ed5d0174b338d05b4dc96eb0d7f55 (patch)
treeac0f391e7626d047131c342d1bc34297de779c14 /Library/Homebrew/cmd/pull.rb
parent1acdeb3bb72ac1e67b5c83f3dd55389f24b84e9c (diff)
downloadbrew-5c7c7a4ce66ed5d0174b338d05b4dc96eb0d7f55.tar.bz2
pull: support taps, use same version as test-bot.
Diffstat (limited to 'Library/Homebrew/cmd/pull.rb')
-rw-r--r--Library/Homebrew/cmd/pull.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index 5ab329f73..2b8da3475 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -159,19 +159,16 @@ module Homebrew
# Publish bottles on Bintray
bintray_user = ENV["BINTRAY_USER"]
bintray_key = ENV["BINTRAY_KEY"]
- bintray_repo = if tap_name
- tap_name.sub("/", "-") + "-bottles"
- else
- "bottles"
- end
- # Skip taps for now until we're using Bintray for Homebrew/homebrew
- if bintray_user && bintray_key && !tap_name
+ if bintray_user && bintray_key
+ bintray_repo = Bintray.repository(tap_name)
changed_formulae.each do |f|
+ next unless `git show --oneline --no-patch` =~ /: add .+ bottle./
ohai "Publishing on Bintray:"
- safe_system "curl", "--silent", "--fail",
+ version = Bintray.version(f.bottle.url)
+ curl "--silent", "--fail",
"-u#{bintray_user}:#{bintray_key}", "-X", "POST",
- "https://api.bintray.com/content/homebrew/#{bintray_repo}/#{f.name}/#{f.version}/publish"
+ "https://api.bintray.com/content/homebrew/#{bintray_repo}/#{f.name}/#{version}/publish"
puts
end
end