Skip to content

Commit

Permalink
defer after("deploy:setup", "cake:database:config") and after("deploy…
Browse files Browse the repository at this point in the history
…:symlink", "cake:database:symlink") to actual needed location to allow for multistaging
  • Loading branch information
damusnet committed Apr 2, 2011
1 parent af6fdf2 commit 6c25152
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/capcake.rb
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6c25152

Please sign in to comment.