Skip to content

Commit

Permalink
Fix missing method
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Oct 16, 2012
1 parent f36cca5 commit 32c08f7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/symfony2/deploy.rb
Expand Up @@ -31,7 +31,7 @@
}

if methods[permission_method]
pretty_print_msg "--> Setting permissions"
capifony_pretty_print "--> Setting permissions"

if fetch(:use_sudo, false)
methods[permission_method].each do |cmd|
Expand All @@ -51,7 +51,7 @@
end
end
end
puts_ok
capifony_puts_ok
else
puts " Permission method '#{permission_method}' does not exist.".yellow
end
Expand All @@ -61,19 +61,19 @@
desc "Symlinks static directories and static files that need to remain between deployments"
task :share_childs, :roles => :app, :except => { :no_release => true } do
if shared_children
pretty_print_msg "--> Creating symlinks for shared directories"
capifony_pretty_print "--> Creating symlinks for shared directories"

shared_children.each do |link|
run "#{try_sudo} mkdir -p #{shared_path}/#{link}"
run "#{try_sudo} sh -c 'if [ -d #{release_path}/#{link} ] ; then rm -rf #{release_path}/#{link}; fi'"
run "#{try_sudo} ln -nfs #{shared_path}/#{link} #{release_path}/#{link}"
end

puts_ok
capifony_puts_ok
end

if shared_files
pretty_print_msg "--> Creating symlinks for shared files"
capifony_pretty_print "--> Creating symlinks for shared files"

shared_files.each do |link|
link_dir = File.dirname("#{shared_path}/#{link}")
Expand All @@ -82,21 +82,21 @@
run "#{try_sudo} ln -nfs #{shared_path}/#{link} #{release_path}/#{link}"
end

puts_ok
capifony_puts_ok
end
end

desc "Updates latest release source path"
task :finalize_update, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} chmod -R g+w #{latest_release}" if fetch(:group_writable, true)

pretty_print_msg "--> Creating cache directory"
capifony_pretty_print "--> Creating cache directory"

run "#{try_sudo} sh -c 'if [ -d #{latest_release}/#{cache_path} ] ; then rm -rf #{latest_release}/#{cache_path}; fi'"
run "#{try_sudo} sh -c 'mkdir -p #{latest_release}/#{cache_path} && chmod -R 0777 #{latest_release}/#{cache_path}'"
run "#{try_sudo} chmod -R g+w #{latest_release}/#{cache_path}"

puts_ok
capifony_puts_ok

share_childs

Expand All @@ -107,10 +107,10 @@
if asset_paths.chomp.empty?
puts " No asset paths found, skipped".yellow
else
pretty_print_msg "--> Normalizing asset timestamps"
capifony_pretty_print "--> Normalizing asset timestamps"

run "#{try_sudo} find #{asset_paths} -exec touch -t #{stamp} {} ';' &> /dev/null || true", :env => { "TZ" => "UTC" }
puts_ok
capifony_puts_ok
end
end
end
Expand Down

0 comments on commit 32c08f7

Please sign in to comment.