diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2017-10-02 17:25:56 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2017-10-02 17:25:56 +0200 |
commit | 62ef2e73b879f09be1871573e59ea52e3c79372a (patch) | |
tree | fa432d11fc05f56f5f13a778dab3ebfaeeb7dc8b /config/deploy.rb | |
parent | e505fa45eded7a1a15c8362350e878688c229d5f (diff) | |
download | norsk-urskog-registrations-62ef2e73b879f09be1871573e59ea52e3c79372a.tar.gz norsk-urskog-registrations-62ef2e73b879f09be1871573e59ea52e3c79372a.tar.bz2 norsk-urskog-registrations-62ef2e73b879f09be1871573e59ea52e3c79372a.zip |
Don't deploy config if it exists already.
Diffstat (limited to 'config/deploy.rb')
-rw-r--r-- | config/deploy.rb | 6 |
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 |