From 2e5bb2ca0902fe188a17b8874d91d1680353e610 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Tue, 16 Sep 2014 14:49:49 +0200 Subject: [PATCH] Namespace YARD Rake tasks under "doc". --- task/doc.rake | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/task/doc.rake b/task/doc.rake index 8770904..f7735bf 100644 --- a/task/doc.rake +++ b/task/doc.rake @@ -1,15 +1,17 @@ -desc 'Generates YARD documentation' -task :doc => :generate do - sh 'yard' -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'" +namespace :doc do + desc 'Generates YARD documentation' + task :build => :generate do + sh 'yard' + end + + 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) + + sh "scp -r yardoc europa:#{version_dir}" + + sh "ssh europa 'rm -f #{root_dir}/latest " \ + "&& ln -s #{version_dir} #{root_dir}/latest'" + end end