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