If you want to pass parameters to your tasks, you can do it via environment variables:
cap upload FILES=dir_a,dir_b,dir_cThen, your upload task gets the FILES env var, parses it, and processes the directories as needed:
task :upload do
files = ENV['FILES'].split(/,/)
# ...
end
- Jamis
On Sep 30, 2007, at 1:14 AM, Adam Salter wrote:
OK, Here's the problem... I'm using Cap as a basic shell script replacement (I don't use SCM etc) I like that it gives you descriptions and namespaces and such for tasks, and it's all going swimmingly - except... I'd like to be able to read the arguments off the command into an array... cap upload dir_a dir_b dir_c I know that the capistrano multistage extension reads several items from the command line, so it should be possible. If i just execute the above as is, I get a "task dir_a not found" (although I can still use the arguments with ARGV[]). TIA, -Adam --~--~---------~--~----~------------~-------~--~----~To unsubscribe from this group, send email to capistrano- [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/ group/capistrano-~----------~----~----~----~------~----~------~--~---
smime.p7s
Description: S/MIME cryptographic signature
