Skip to content

Instantly share code, notes, and snippets.

@xdite
Created September 12, 2008 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xdite/10417 to your computer and use it in GitHub Desktop.
Save xdite/10417 to your computer and use it in GitHub Desktop.
namespace :deploy do
desc "Create database.yml and asset packages for production"
task :after_update_code, :roles => [:web] do
db_config = "#{shared_path}/config/database.yml.production"
run <<-EOF
cp #{db_config} #{release_path}/config/database.yml
EOF
run <<-EOF
ln -s #{shared_path}/upload #{latest_release}/public/upload
EOF
end
desc "Restart Mongrel"
task :restart, :roles => [:app] do
run <<-EOF
cd #{current_path} && mongrel_rails cluster::restart
EOF
end
end
desc "Find out svn version on server"
task :what_version, :roles => [:app] do
stream <<-CMD
svn info #{current_path}/app
CMD
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment