Created
May 30, 2014 16:37
-
-
Save erlingur/027800a726cb71a367af to your computer and use it in GitHub Desktop.
Capistrano upload task
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
namespace :deploy do | |
task :upload do | |
files = (ENV["FILES"] || "").split(",").map { |f| Dir[f.strip] }.flatten | |
abort "Please specify at least one file or directory to update (via the FILES environment variable)" if files.empty? | |
on release_roles :all do | |
files.each { |file| upload!(file, File.join(current_path, file)) } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add recursive: true
files.each { |file| upload!(file, File.join(current_path, file), recursive: true) }