From 62ef2e73b879f09be1871573e59ea52e3c79372a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 2 Oct 2017 17:25:56 +0200 Subject: Don't deploy config if it exists already. --- config/deploy.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/deploy.rb b/config/deploy.rb index 9456fef..1836fe6 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -32,8 +32,10 @@ namespace :deploy do before 'check:linked_files', :upload_config => 'config.yml' do |t| on roles(:app) do - shared_dir = File.join(fetch(:deploy_to), 'shared') - upload!(t.prerequisites.first, File.join(shared_dir, t.prerequisites.first)) + target_file = File.join(fetch(:deploy_to), 'shared', t.prerequisites.first) + unless test("[ -f #{target_file} ]") + upload!(t.prerequisites.first, target_file) + end end end -- cgit v1.2.3