Skip to content

Instantly share code, notes, and snippets.

@leehambley
Created October 5, 2009 21:45
Show Gist options
  • Save leehambley/202504 to your computer and use it in GitHub Desktop.
Save leehambley/202504 to your computer and use it in GitHub Desktop.
namespace :deploy do
task :example do
puts ""
end
end
namespace :database do
task :configured? do
true if capture("/mysql/daemon.status/or/something?") =~ /OK/
end
task :configure do
run "configure mysql" unless configured?
end
task :seed do
run "Seed database somehow...."
end
end
before "database:seed", "database:configure"
before "deploy:update_code", "database:seed"
before "deploy:symlink", "deploy:example"
after "deploy:symlink" do
# this is an inline task
run "task that creates /remote/file"
download('/remote/file', '/tmp/local-file')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment