publish org doc from Rakefile

This commit is contained in:
Noam Postavsky
2013-11-26 21:47:47 -05:00
parent 07b1d3925c
commit fd3fa39444
2 changed files with 41 additions and 16 deletions

View File

@@ -54,11 +54,11 @@ task :release => [:package, 'doc:archive'] do
raise "Not implemented for github yet!"
end
rule '.html' => '.rst' do |t|
sh "doc/compile-doc.py #{t.source} > #{t.name}"
end
desc "Generate document"
task :doc => FileList['doc/*.rst'].ext('html')
task :doc do
sh "#{$EMACS} -Q -L . --batch -l doc/yas-doc-helper.el" +
" -f yas--generate-html-batch"
end
namespace :doc do
task :archive do
@@ -79,8 +79,10 @@ namespace :doc do
Dir.glob("doc/images/*").each do |file|
FileUtils.cp file, 'doc/gh-pages/images'
end
rev = `git rev-parse --verify HEAD`
Dir.chdir 'doc/gh-pages' do
sh "git commit -a -m 'Automatic documentation update.'"
sh "git commit -a -m 'Automatic documentation update.\n\n" +
"From #{rev.chomp()}'"
sh "git push"
end
end