Skip to content

Instantly share code, notes, and snippets.

@glaszig
Created July 16, 2014 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glaszig/9f06a23448324b8d7258 to your computer and use it in GitHub Desktop.
Save glaszig/9f06a23448324b8d7258 to your computer and use it in GitHub Desktop.
Upload task for Capistrano 3
namespace :deploy do
desc "Uploads a comma-separated list of files from ENV['files']"
task :upload do
on roles(:app) do
ENV.fetch('files', ENV['FILES']).split(',').map(&:strip).each do |file|
upload! file, current_path.join(file), recursive: true
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment