We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6ab6b2 commit 8872532Copy full SHA for 8872532
1 file changed
Rakefile
@@ -135,10 +135,19 @@ namespace :docker do
135
return File.read(cache_path)
136
end
137
138
- head_hash = `curl -fs -H 'accept: application/vnd.github.v3.sha' https://api.github.com/repos/ruby/ruby/commits/master`.chomp
139
- unless $?.success?
140
- raise "get_ruby_master_head_hash failed: #{head_hash.inspect}"
+ count = 5
+
+ loop do
141
+ head_hash = `curl -fs -H 'accept: application/vnd.github.v3.sha' https://api.github.com/repos/ruby/ruby/commits/master`.chomp
142
+ if $?.success? || count.zero?
143
+ break
144
+ else
145
+ p "get_ruby_master_head_hash failed: #{head_hash.inspect}"
146
+ count -= 1
147
+ sleep 5
148
+ end
149
150
151
if cache_path
152
File.write(cache_path, head_hash)
153
0 commit comments