Andrew, The cleanup task isn't executed by default (this may change) - but as it's simple shell code in the end, you should be able to override the variable containing the shell command that returns the list of old_releases.
If you find some way to infer which releases are not linked, then you can clean them up using the same cleanup task, just with a replacement list of target directories. I wouldn't like to try and come up with a portable way to do do that but you might have some success with `readlink` (man 1 readlink) to print the full paths of files, or perhaps better yet using `find` which has a `--links` option, from the documentation: True if the file has n links. This might work for you. - Lee On Wednesday, May 30, 2012 at 6:21 PM, Andrew Havens wrote: > I am currently using Capistrano to deploy my PHP applications. This has been > working well so far. Now I am trying to deploy a new type of project: a > shared library. This goes against the the Capistrano default deployment > because I don't need a current, releases, and shared. I only really care > about deploying a new tag. My idea so far is to create a tags directory and > symlink each release with the tag name. It would be nice if I could figure > out how to name the release after the tag, but this seems to work for now. > However, I realized that I currently have a setting to keep the last 10 > releases. This will not work for me because I won't know if an old release is > still being used. I need to implement a custom "cleanup" strategy so that I > can keep an unlimited number of releases, but only clean up the ones that > aren't being symlinked by projects using this shared library. How can I do > this? > > Thanks, > Andrew > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to [email protected] > (mailto:[email protected]) > * To unsubscribe from this group, send email to > [email protected] > (mailto:[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
