I'm looking for an easy way to revert to a previous release if something goes wrong with the latest version in Capistrano
Is there any command like cap goback to undo the last deployment ? (thus updating the current symbolic link to her old location )
Is it built-in or do I just need to complete the task myself?
Here is my recipe:
set :user, "root"
set :use_sudo, false
set :domain, "www.domain.info"
set :deploy_to, "/home/beta2"
set :current_dir, "public_html"
set :scm, "git"
set :repository, "git@github.com:user/ac.git"
set :deploy_via, :remote_cache
set :scm_verbose, true
set :git_enable_submodules, 1
role :web, domain
role :app, domain
task :link_shared_directories do
run "ln -s #{shared_path}/photos #{release_path}/photos"
end
after "deploy:update_code", :link_shared_directories
source
share