Permalink
Browse files

Update Rakefile

  • Loading branch information...
1 parent 24f92a1 commit 0fc59a772c750841a5f4396630ca0fe87905ccc0 @vmg committed Oct 11, 2012
Showing with 8 additions and 20 deletions.
  1. +8 −20 Rakefile
View
28 Rakefile
@@ -3,14 +3,21 @@ require 'rake/clean'
require 'rake/extensiontask'
require 'digest/md5'
-task :default => :test
+task :default => [:checkout, :test]
# ==========================================================
# Ruby Extension
# ==========================================================
Rake::ExtensionTask.new('redcarpet')
+task :checkout do |t|
+ unless File.exists?('sundown/src/markdown.h')
+ sh 'git submodule init'
+ sh 'git submodule update'
+ end
+end
+
# ==========================================================
# Testing
# ==========================================================
@@ -109,22 +116,3 @@ task :update_gem do
puts "updated #{GEMFILE}"
end
-desc 'Gather required Sundown sources into extension directory'
-task :gather => 'sundown/src/markdown.h' do |t|
- files =
- FileList[
- 'sundown/src/{markdown,buffer,stack,autolink,html_blocks}.h',
- 'sundown/src/{markdown,buffer,stack,autolink}.c',
- 'sundown/html/{html,html_smartypants,houdini_html_e,houdini_href_e}.c',
- 'sundown/html/{html,houdini}.h',
- ]
- cp files, 'ext/redcarpet/',
- :preserve => true,
- :verbose => true
-end
-
-file 'sundown/src/markdown.h' do |t|
- abort "The Sundown submodule is required."
-end
-
-

0 comments on commit 0fc59a7

Please sign in to comment.