diff options
author | Henare Degan <henare.degan@gmail.com> | 2012-09-11 16:17:24 +1000 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2012-09-11 16:17:24 +1000 |
commit | 1c49795f52308fdeb5427d2efdc207aa78a6a2b9 (patch) | |
tree | 96c75d0c5ae5efa06863a032b5f8975d27b28d83 | |
parent | f9b765cdfc56ce69c18ab47a767d0200c2e38709 (diff) |
Start linking in required config
-rw-r--r-- | config/deploy.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index bbb1ee155..e4c7afd8b 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -27,4 +27,15 @@ namespace :deploy do desc "#{t} task is a no-op with mod_rails" task t, :roles => :app do ; end end + + desc "Link additional configuration after code update" + after "deploy:update_code" do + links = { + "#{release_path}/config/database.yml" => "#{shared_path}/database.yml", + "#{release_path}/config/general.yml" => "#{shared_path}/general.yml" + } + + # "ln -sf <a> <b>" creates a symbolic link but deletes <b> if it already exists + run links.map {|a| "ln -sf #{a.last} #{a.first}"}.join(";") + end end |