cap-chown 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cap-chown.rb +3 -0
- data/lib/cap-chown/version.rb +1 -1
- metadata +1 -1
data/lib/cap-chown.rb
CHANGED
@@ -5,11 +5,14 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
5
5
|
desc "Chown all files in release to application account"
|
6
6
|
|
7
7
|
task :chown do
|
8
|
+
old_sudo = sudo
|
9
|
+
set :sudo, "sudo"
|
8
10
|
if app_user && app_group
|
9
11
|
run "#{sudo} chown -R #{app_user}:#{app_group} #{releases_path}"
|
10
12
|
else
|
11
13
|
puts "WARNING: not chowning release path, because either app_user or app_group is not set!"
|
12
14
|
end
|
15
|
+
set :sudo, old_sudo
|
13
16
|
end
|
14
17
|
end
|
15
18
|
after 'deploy:cleanup', 'deploy:chown'
|
data/lib/cap-chown/version.rb
CHANGED