Hello-

We've got a topology that seems well suited to using the copy strategy:
1 - 'svn up -r {xyz}' to a local cache directory
2 - copy_exclude to another local directory
3 - execute local transforms on the local staging directory
4 - compress that directory to a single .zip file
5 - copy that zip file to the remote servers
6 - unpack it there into releases_path

The copy strategy does this exactly, and comes tantalizingly close to  
what I need.  My problem is that I want to do more in step 3.

The current copy strategy step 3 writes a REVISION file reflecting  
what revision was checked out.

I want to do some more processing that is:
a) Post checkout (not in our SCM repo)
b) Run on the capistrano console and not on the app servers
c) Results in a package that's copied identically to all servers.

I could monkey-patch the Capistrano::Deploy::Strategy::Copy#deploy!  
function, and paste my code smack in the middle.  This solution works  
OK but feels fragile, obscure, WRONG.

What's the best practice here?  The pattern of having before_{task}  
and after_{task} tasks feels tidy, but it's hard to see how to  
introduce it here.

Am I stuck writing my own strategy that derives from Copy?  Or monkey  
patching Copy itself?

Thanks,
-Bill Kirtley

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to