From f94461a9cadd3858bbf2bc5ee39484b865a5af96 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sat, 17 Jan 2015 18:00:05 +0100 Subject: [PATCH] Upload docs to S3. --- task/doc.rake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/task/doc.rake b/task/doc.rake index f7735bf..612617d 100644 --- a/task/doc.rake +++ b/task/doc.rake @@ -6,12 +6,12 @@ namespace :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) + version = GEMSPEC.version.to_s + bucket = 's3://code.yorickpeterse.com' + directory = GEMSPEC.name - sh "scp -r yardoc europa:#{version_dir}" - - sh "ssh europa 'rm -f #{root_dir}/latest " \ - "&& ln -s #{version_dir} #{root_dir}/latest'" + sh "aws s3 rm --recursive #{bucket}/#{directory}/latest" + sh "aws s3 sync yardoc #{bucket}/#{directory}/#{version}" + sh "aws s3 sync yardoc #{bucket}/#{directory}/latest" end end