Skip to content

Instantly share code, notes, and snippets.

@c10l
Created October 4, 2012 18:20
Show Gist options
  • Save c10l/3835420 to your computer and use it in GitHub Desktop.
Save c10l/3835420 to your computer and use it in GitHub Desktop.
merge namespaces
...
set :stack, :php
...
# At this point, I want deploy:restart to be overwritten by php:deploy:restart etc
namespace :php do
namespace :deploy do
task :restart do
run "sudo apachectl configtest && sudo apachectl graceful"
end
task :touch_up do
if setup_data then
shared_children.each { |dir| run "mkdir -p #{shared_path}/#{dir}" }
run "ln -s #{shared_path} #{release_path}/data"
end
end
end
end
namespace :rails do
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart do
run "mkdir -p #{current_path}/tmp"
run "touch #{current_path}/tmp/restart.txt"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment