Skip to content

Instantly share code, notes, and snippets.

@muraoka-edo
Created September 28, 2014 06:16
Show Gist options
  • Save muraoka-edo/489fa7da85ec17c41182 to your computer and use it in GitHub Desktop.
Save muraoka-edo/489fa7da85ec17c41182 to your computer and use it in GitHub Desktop.
[Ruby] capistrano2-upload
# collect:upload_files
namespace :collect do
desc 'deploy files'
task :upload_files, roles => :local do
upload_dir= File.expand_path('~/scpfiles')
upload_files = [ "#{upload_dir}/hoge.rb",
"#{upload_dir}/foodir",
]
upload_files.each do |fp|
fname = File.basename(fp)
upload(fp, "/tmp/#{application}/releases/#{fname}", :via => :scp, :recursive => true)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment