Created
April 5, 2012 14:02
-
-
Save jeroenr/2311229 to your computer and use it in GitHub Desktop.
Capistrano deploy:setup task without root permission
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :deploy do | |
task :setup, :except => { :no_release => true } do | |
dirs = [deploy_to, releases_path, shared_path] | |
dirs += shared_children.map { |d| File.join(shared_path, d.split('/').last) } | |
run "mkdir -p #{dirs.join(' ')}" | |
run "chmod g+w #{dirs.join(' ')}" if fetch(:group_writable, true) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment