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:"
|
ohai "Publishing on Bintray:"
|
||||||
package = Bintray.package f.name
|
package = Bintray.package f.name
|
||||||
version = f.pkg_version
|
version = f.pkg_version
|
||||||
curl "--silent", "--fail",
|
curl "-w", '\n', "--silent", "--fail",
|
||||||
"-u#{bintray_user}:#{bintray_key}", "-X", "POST",
|
"-u#{bintray_user}:#{bintray_key}", "-X", "POST",
|
||||||
|
"-d", '{"publish_wait_for_secs": -1}',
|
||||||
"https://api.bintray.com/content/homebrew/#{repo}/#{package}/#{version}/publish"
|
"https://api.bintray.com/content/homebrew/#{repo}/#{package}/#{version}/publish"
|
||||||
puts
|
success = system "brew", "fetch", "--retry", "--force-bottle", f.full_name
|
||||||
sleep 20
|
unless success
|
||||||
safe_system "brew", "fetch", "--retry", "--force-bottle", f.full_name
|
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
|
end
|
||||||
else
|
else
|
||||||
opoo "You must set BINTRAY_USER and BINTRAY_KEY to add or update bottles on Bintray!"
|
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