diff options
| author | mo k <mo@mokhan.ca> | 2012-09-22 16:53:26 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-09-22 16:53:26 -0600 |
| commit | 82f244edf2cb25a70084a77f9adbc76ae7628b70 (patch) | |
| tree | e12ad6883a841590bb05ca9259e70f876625ac58 /config/deploy.rb | |
| parent | 6c4e2db2c67320e158731594b7b1ea9e5f99ae6a (diff) | |
pick out the target env when symlink to the proper database settings file.
Diffstat (limited to 'config/deploy.rb')
| -rw-r--r-- | config/deploy.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 16afd323..e234c033 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -27,8 +27,8 @@ after 'deploy:update_code', 'deploy:symlink_db' namespace :deploy do task :symlink_db, :roles => :app do - # todo: need to replace 'production' with target environment - run "ln -nfs #{release_path}/config/database.production.yml.example #{release_path}/config/database.yml" + environment = ARGV[0] + run "ln -nfs #{release_path}/config/database.#{environment}.yml.example #{release_path}/config/database.yml" #run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml" end end |
