Skip to content

Instantly share code, notes, and snippets.

@adamdilek
Created February 17, 2014 09:34
Show Gist options
  • Save adamdilek/9047556 to your computer and use it in GitHub Desktop.
Save adamdilek/9047556 to your computer and use it in GitHub Desktop.
namespace :settings do
desc 'Setup settings.'
task :setup do
run "mkdir -p #{shared_path}/config/settings"
put File.read('config/settings.local.yml'), "#{shared_path}/config/settings.yml"
put File.read('config/settings/staging.local.yml'), "#{shared_path}/config/settings/staging.yml"
put File.read('config/settings/production.local.yml'), "#{shared_path}/config/settings/production.yml"
put File.read('config/s3.local.yml'), "#{shared_path}/config/s3.yml"
run "ln -nfs #{shared_path}/config/settings.yml #{release_path}/config/settings.yml"
run "ln -nfs #{shared_path}/config/settings/staging.yml #{release_path}/config/settings/staging.yml"
run "ln -nfs #{shared_path}/config/settings/production.yml #{release_path}/config/settings/production.yml"
run "ln -nfs #{shared_path}/config/s3.yml #{release_path}/config/s3.yml"
end
after 'deploy:finalize_update', 'settings:setup'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment