I would look at using a before deploy:symlink hook
And you will need to use #{current_path} to reference the current working
release directory because your current_release and latest_release will point to
your newly deploying release directory.
Ymmv
Generally the accepted way to deal with this is put that directory in the
shared dir and create a symlink to it during your deploy; that way the contents
are stable from release to release as well as rollback.
Search the cap code base for shared_children
On Dec 19, 2011, at 7:39 AM, Roch Delsalle <[email protected]> wrote:
> Hi,
>
> I would like to know how I can execute a command on the server before
> capistrano switches to the new sources. I want to backup some files
> before the sources are replaced.
>
> Thanks,
>
> Roch
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en