Skip to content

Instantly share code, notes, and snippets.

@robinbowes
Forked from leehambley/gist:202504
Created October 7, 2009 00:25
Show Gist options
  • Save robinbowes/203597 to your computer and use it in GitHub Desktop.
Save robinbowes/203597 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