From 6c25152c1108312c8e199856c43f2c767f8b2812 Mon Sep 17 00:00:00 2001 From: damusnet Date: Sat, 2 Apr 2011 07:18:29 -0700 Subject: [PATCH] defer after("deploy:setup", "cake:database:config") and after("deploy:symlink", "cake:database:symlink") to actual needed location to allow for multistaging --- lib/capcake.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/capcake.rb b/lib/capcake.rb index 4eee07d..d54a6ce 100644 --- a/lib/capcake.rb +++ b/lib/capcake.rb @@ -52,8 +52,6 @@ def capcake() _cset(:cache_path) { File.join(tmp_path, "cache") } _cset(:logs_path) { File.join(tmp_path, "logs") } - after("deploy:setup", "cake:database:config") if (!remote_file_exists?(database_path)) - after("deploy:symlink", "cake:database:symlink") if (remote_file_exists?(database_path)) end def defaults(val, default) @@ -101,6 +99,7 @@ def remote_file_exists?(full_path) run "#{try_sudo} mkdir -p #{(dirs + tmp_dirs).join(' ')} && #{try_sudo} chmod -R 777 #{tmp_path}" if (!user.empty?) set :git_flag_quiet, "-q " cake.setup if (!cake_branch.empty?) + cake.database.config if (!remote_file_exists?(database_path)) end desc <<-DESC @@ -176,6 +175,7 @@ def remote_file_exists?(full_path) run "ln -s #{shared_path}/system #{latest_release}/webroot/system && ln -s #{shared_path}/tmp #{latest_release}/tmp"; run "rm -f #{current_path} && ln -s #{latest_release} #{current_path}" run "cp #{latest_release}/config/core.php #{core_config_path}" if (!remote_file_exists?(core_config_path)) + cake.database.symlink if (remote_file_exists?(database_path)) end desc <<-DESC