after first deploy with set :deploy_via, :copy for make changes in app now I’m using:
set :deploy_via, :remote_cache
each time that I update changes make a new release but not remove the old releases.
I can see in releases folder:
20120325165324 20120326132816 20120326150033 20120326150716 20120326151632 20120326161602 20120326171203
I want only have 3 o 5 releases maximum.
I have in my deploy.rb:
set :keep_releases, 5
but this is does not works for me.
How can I remove old releases after deploy with set :deploy_via, :remote_cache
Thank you!
You also need to either manually run cap deploy:cleanup, or simpler, just call in from within your deploy script via a callback, e.g. add this to
deploy.rbwhich says, “when the restart task of deployment is complete, then run the cleanup task”. The default for
:keep_releasesis 5, so you don’t really need to add it … but it doesn’t hurt.