test-bot: use Bintray package naming.

This commit is contained in:
Mike McQuaid 2015-02-19 12:56:57 +00:00
parent cf72e942b6
commit e5f145abab

View File

@ -747,24 +747,25 @@ module Homebrew
Dir.glob("*.bottle*.tar.gz") do |filename| Dir.glob("*.bottle*.tar.gz") do |filename|
version = Bintray.version filename version = Bintray.version filename
formula = bottle_filename_formula_name filename formula_name = bottle_filename_formula_name filename
existing_bottle = existing_bottles[formula] bintray_package = Bintray.package formula_name
existing_bottle = existing_bottles[formula_name]
# Disable taps temporarily until Bintray sorts our repositories. # Disable taps temporarily until Bintray sorts our repositories.
next if tap next if tap
unless formula_packaged[formula] unless formula_packaged[formula_name]
package_url = "#{bintray_repo_url}/#{formula}" package_url = "#{bintray_repo_url}/#{bintray_package}"
unless system "curl", "--silent", "--fail", "--output", "/dev/null", package_url unless system "curl", "--silent", "--fail", "--output", "/dev/null", package_url
curl "--silent", "--fail", "-u#{bintray_user}:#{bintray_key}", curl "--silent", "--fail", "-u#{bintray_user}:#{bintray_key}",
"-H", "Content-Type: application/json", "-H", "Content-Type: application/json",
"-d", "{\"name\":\"#{formula}\"}", bintray_repo_url "-d", "{\"name\":\"#{bintray_package}\"}", bintray_repo_url
puts puts
end end
formula_packaged[formula] = true formula_packaged[formula_name] = true
end end
content_url = "https://api.bintray.com/content/homebrew/#{bintray_repo}/#{formula}/#{version}/#{filename}" content_url = "https://api.bintray.com/content/homebrew/#{bintray_repo}/#{bintray_package}/#{version}/#{filename}"
content_url += "?publish=1&override=1" if existing_bottle content_url += "?publish=1&override=1" if existing_bottle
curl "--silent", "--fail", "-u#{bintray_user}:#{bintray_key}", curl "--silent", "--fail", "-u#{bintray_user}:#{bintray_key}",
"-T", filename, content_url "-T", filename, content_url