Namespace YARD Rake tasks under "doc".

This commit is contained in:
Yorick Peterse 2014-09-16 14:49:49 +02:00
parent ed6283ab7e
commit 2e5bb2ca09
1 changed files with 16 additions and 14 deletions

View File

@ -1,10 +1,11 @@
desc 'Generates YARD documentation'
task :doc => :generate do
namespace :doc do
desc 'Generates YARD documentation'
task :build => :generate do
sh 'yard'
end
end
desc 'Generates and uploads the documentation'
task :upload_doc => :doc do
desc 'Generates and uploads the documentation'
task :upload => :build do
root_dir = "/srv/http/code.yorickpeterse.com/public/oga"
version_dir = File.join(root_dir, Oga::VERSION)
@ -12,4 +13,5 @@ task :upload_doc => :doc do
sh "ssh europa 'rm -f #{root_dir}/latest " \
"&& ln -s #{version_dir} #{root_dir}/latest'"
end
end