I had this strange problem with Capistrano 3. The deployable code never updates unless I delete the repo folder in my application folder on the server. If I delete the repo folder and expand it, it will update the code.
lock '3.1.0'
set :application, 'APP_NAME'
set :repo_url, 'REPO'
set :deploy_to, '/home/deployer/apps/APP_NAME'
set :scm, :git
set :branch, "master"
set :format, :pretty
set :log_level, :info
set :use_sudo, false
set :linked_files, ["config/database.yml"]
namespace :deploy do
desc "Start Unicorn"
task :start do
on roles(:app) do
within current_path do
execute :bundle, "exec unicorn_rails -c config/unicorn.rb -D"
end
end
end
desc "Stop Unicorn"
task :stop do
on roles(:app) do
execute "kill -s QUIT `cat #{shared_path}/pids/unicorn.pid`"
end
end
desc "Restart application"
task :restart do
invoke 'deploy:stop'
invoke 'deploy:start'
end
end
source
share