forked from HipByte/RubyMotionDocumentation
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (27 loc) · 755 Bytes
/
Rakefile
File metadata and controls
30 lines (27 loc) · 755 Bytes
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
task :default => :doc
task :doc do
Dir.glob('**/*.txt').each do |src|
Dir.chdir(File.dirname(src)) do
src = File.basename(src)
dest = src.sub(/\.txt/, '.html')
if !File.exist?(dest) or File.mtime(src) > File.mtime(dest)
sh "bundle exec mizuho -a max-width=55em --icons-dir \"../../icons\" \"#{src}\" -o \"#{dest}\""
end
end
end
end
task :clean do
Dir.glob('**/*.html').each do |file|
File.unlink(file)
end
end
task :deploy do
system 'git checkout gh-pages'
system 'git merge japanese'
Rake::Task['clean'].invoke
Rake::Task['doc'].invoke
system 'git add **/*.html'
system 'git commit -m "generate the HTML document"'
system 'git push origin gh-pages'
system 'git checkout japanese'
end