summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2017-10-02 17:25:56 +0200
committerHarald Eilertsen <haraldei@anduin.net>2017-10-02 17:25:56 +0200
commit62ef2e73b879f09be1871573e59ea52e3c79372a (patch)
treefa432d11fc05f56f5f13a778dab3ebfaeeb7dc8b
parente505fa45eded7a1a15c8362350e878688c229d5f (diff)
downloadnorsk-urskog-registrations-62ef2e73b879f09be1871573e59ea52e3c79372a.tar.gz
norsk-urskog-registrations-62ef2e73b879f09be1871573e59ea52e3c79372a.tar.bz2
norsk-urskog-registrations-62ef2e73b879f09be1871573e59ea52e3c79372a.zip
Don't deploy config if it exists already.
-rw-r--r--config/deploy.rb6
1 files 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