-
Notifications
You must be signed in to change notification settings - Fork 16
/
Rakefile
46 lines (39 loc) · 962 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
desc "compile php-sundown"
task :compile => ['sundown/src/markdown.h'] do
sh "phpize"
sh "./configure"
sh "make"
end
desc "update contributors"
task :contributors do
sh "git shortlog -s -n | php -R 'list($d, $c)=explode(\"\t\", $argn, 2);echo $c .PHP_EOL;' > CONTRIBUTORS"
end
desc "install php-sundown to your php"
task :install => [:compile] do
sh "make install"
end
task :clean do
sh "phpize --clean"
end
desc "run php test cases"
task :test do
ENV["TESTS"] = "--show-diff -q"
sh "make test"
sh "cat tests/*.diff; if [ $? -eq 0 ];then exit 1; fi"
end
desc "Run conformance tests"
task "test:conformance" do
Dir.chdir("conformance_test") do
script = "#{pwd}/Markdown.sh"
Dir.chdir("MarkdownTest_1.0.3") do
sh "./MarkdownTest.pl --script='#{script}' --tidy"
end
end
end
file 'sundown/src/markdown.h' do |t|
abort "The Sundown submodule is required."
end
task :submodule do
sh "git submodule init"
sh "git submodule update"
end