Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Fit for Travis-CI env
Browse files Browse the repository at this point in the history
  • Loading branch information
masuidrive committed Apr 9, 2013
1 parent 37e8caf commit 97df250
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tasks/build.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
ENV['MRUBY_CONFIG'] = File.join(File.dirname(__FILE__), '..', 'build-libmruby.rb')

# https://gist.github.com/nayutaya/293358
module Enumerable
def retry_if(*klasses)
e = nil
self.each { |arg|
begin
return yield(arg)
rescue *klasses => e
next
end
}
raise(e)
end
end

unless File.exists?('submodules/mruby/Rakefile')
sh %Q{git submodule init}
sh %Q{git submodule update}
5.times.retry_if(RuntimeError) do
raise unless system %Q{git submodule update}
end
end
load 'submodules/mruby/Rakefile'

Expand Down

0 comments on commit 97df250

Please sign in to comment.