pull: wait for Bintray publish, don't sleep.
Closes Homebrew/homebrew#41530. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
6bbbd2481a
commit
913659efe4
@ -185,12 +185,16 @@ module Homebrew
|
||||
ohai "Publishing on Bintray:"
|
||||
package = Bintray.package f.name
|
||||
version = f.pkg_version
|
||||
curl "--silent", "--fail",
|
||||
curl "-w", '\n', "--silent", "--fail",
|
||||
"-u#{bintray_user}:#{bintray_key}", "-X", "POST",
|
||||
"-d", '{"publish_wait_for_secs": -1}',
|
||||
"https://api.bintray.com/content/homebrew/#{repo}/#{package}/#{version}/publish"
|
||||
puts
|
||||
sleep 20
|
||||
safe_system "brew", "fetch", "--retry", "--force-bottle", f.full_name
|
||||
success = system "brew", "fetch", "--retry", "--force-bottle", f.full_name
|
||||
unless success
|
||||
ohai "That didn't work; waiting for 15 seconds and trying again..."
|
||||
sleep 15
|
||||
system "brew", "fetch", "--retry", "--force-bottle", f.full_name
|
||||
end
|
||||
end
|
||||
else
|
||||
opoo "You must set BINTRAY_USER and BINTRAY_KEY to add or update bottles on Bintray!"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user