2014-09-16 12:49:49 +00:00
|
|
|
namespace :doc do
|
|
|
|
desc 'Generates YARD documentation'
|
|
|
|
task :build => :generate do
|
|
|
|
sh 'yard'
|
|
|
|
end
|
2014-09-10 22:10:58 +00:00
|
|
|
|
2014-09-16 12:49:49 +00:00
|
|
|
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)
|
2014-09-10 22:10:58 +00:00
|
|
|
|
2014-09-16 12:49:49 +00:00
|
|
|
sh "scp -r yardoc europa:#{version_dir}"
|
2014-09-10 22:10:58 +00:00
|
|
|
|
2014-09-16 12:49:49 +00:00
|
|
|
sh "ssh europa 'rm -f #{root_dir}/latest " \
|
|
|
|
"&& ln -s #{version_dir} #{root_dir}/latest'"
|
|
|
|
end
|
2014-09-10 22:10:58 +00:00
|
|
|
end
|