Thanks for the new receipe. I knew the get receipe before. For my task, i've used just checking for it as against getting it locally: delete a golden file on the server when failure happens. ( Make sure you copy the file from a known location before the start of the task.) You can even seperate concerns by using new before feature in Cap2. I love Cap when it comes to deployment and automation. Then look for it using the following command. run "ls -l filename"
If the file is not found the error code returned is 1. I have used this value build error checking and report failure in an automated way. -RS On Jan 5, 2:58 am, "Thibaut Barrère" <[EMAIL PROTECTED]> wrote: > Hi and welcome to Capistrano! > > > How do I get Capistrano to look on the remote machine for the file? > > One possibility is to use a 'run' call (I've tried with a "ls -la" > instead of the cat command): > > desc "Display a remote file" > task :display_remote_file do > run "cat /myfolder/myfile.ext" do |ch, st, data| > puts "Here's the result!" > puts data > puts "End of it" > end > end > > Alternatively you could download the file using an additional 'get' > method (http://source.mihelac.org/2007/1/11/capistrano-get-method- > download-files-from-server) then have it displayed. > > hope this helps! > > Thibaut Barrère / LoGeek > --http://blog.logeek.fr- about writing softwarehttp://evolvingworker.com- > tools for a better day --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
