Rake task for uploading documentation.

This commit is contained in:
Yorick Peterse 2014-09-11 00:10:58 +02:00
parent 0c61749c65
commit 5ff7f39f08
1 changed files with 11 additions and 0 deletions

View File

@ -2,3 +2,14 @@ desc 'Generates YARD documentation'
task :doc => :generate do task :doc => :generate do
sh 'yard' sh 'yard'
end end
desc 'Generates and uploads the documentation'
task :upload_doc => :doc do
root_dir = "/srv/http/code.yorickpeterse.com/public/oga"
version_dir = File.join(root_dir, Oga::VERSION)
sh "scp -r yardoc europa:#{version_dir}"
sh "ssh europa 'rm -f #{root_dir}/latest " \
"&& ln -s #{version_dir} #{root_dir}/latest'"
end