adie / mina-scp

Download/upload helpers for Mina deployer using SCP
MIT License
22 stars 7 forks source link

Only one part of one task executed #1

Closed jrhorn424 closed 10 years ago

jrhorn424 commented 10 years ago

In the following task:

desc "Upload secret configuration files."
task :config => :environment do
  queue! scp_upload "#{app_root}/config/application.yml", "#{deploy_to}/shared/config/application.yml", verbose: true
  queue! scp_upload "#{app_root}/config/database.yml", "#{deploy_to}/shared/config/database.yml", verbose: true
end

The first call to scp_upload is successful, but the second one is never triggered. Observe:

➜  recruiter git:(master) ✗ mina config
       $ scp /Users/jrhorn424/projects/ices-recruiter/recruiter/config/application.yml deploy@ices-experiments.org:/u/apps/recruiter/shared/config/application.yml
application.yml                                                      100%  560     0.6KB/s   00:00
➜  recruiter git:(master) ✗

Edit: Upon reviewing the source code for mina-scp, this is likely either a problem with return codes or my understanding of how to create mina tasks.

jrhorn424 commented 10 years ago

Does this have to do with exec'ing the built-up command? Anyway, the following task is a workaround, but doesn't address the issue of multiple calls to scp_upload in the same task.

desc "Upload secret configuration files."
task :config => :environment do
  scp_upload "#{app_root}/config/{application,database}.yml", "#{deploy_to}/shared/config/", verbose: true
end