Created
September 28, 2014 06:16
-
-
Save muraoka-edo/489fa7da85ec17c41182 to your computer and use it in GitHub Desktop.
[Ruby] capistrano2-upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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