Permalink
Browse files

Rakefile: automatically pull submodule upon running rake

  • Loading branch information...
1 parent 0bfb752 commit 57f737a919306600f8c6ae9847896d8b017a0004 @godfat godfat committed May 19, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 Rakefile
View
@@ -1,8 +1,13 @@
# encoding: utf-8
-require "#{dir = File.dirname(__FILE__)}/task/gemgem"
-Gemgem.dir = dir
+begin
+ require "#{dir = File.dirname(__FILE__)}/task/gemgem"
+rescue LoadError
+ sh "git submodule update --init"
+ exec Gem.ruby, "-S", "rake", *ARGV
+end
+Gemgem.dir = dir
($LOAD_PATH << File.expand_path("#{Gemgem.dir}/lib" )).uniq!
desc 'Generate gemspec'

0 comments on commit 57f737a

Please sign in to comment.