aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2015-02-18 12:56:10 +0000
committerMike McQuaid2015-02-18 13:07:22 +0000
commit1f3040599a8821adc653d53e63bea8b881468813 (patch)
tree7c77ebabb6a439e46e8d9317bf575383dc3cab9d /Library/Homebrew
parentff8594b4b07c2f5da6263f2259c4278efa9539b7 (diff)
downloadhomebrew-1f3040599a8821adc653d53e63bea8b881468813.tar.bz2
pull: publish bottles on Bintray.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/pull.rb22
1 files changed, 19 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index ac43bdad6..25abd9187 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -153,9 +153,25 @@ module Homebrew
safe_system "git", "merge", "--ff-only", "--no-edit", bottle_branch
safe_system "git", "branch", "-D", bottle_branch
- # TODO: publish on bintray
- # safe_system "curl", "-u#{user}:#{key}", "-X", "POST",
- # "https://api.bintray.com/content/homebrew/#{repo}/#{formula}/#{version}"
+ # 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
+ changed_formulae.each do |f|
+ ohai "Publishing on Bintray:"
+ safe_system "curl", "--silent", "--fail",
+ "-u#{bintray_user}:#{bintray_key}", "-X", "POST",
+ "https://api.bintray.com/content/homebrew/#{bintray_repo}/#{f.name}/#{f.version}/publish"
+ puts
+ end
+ end
end
ohai 'Patch changed:'