-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First working version with CakePHP 2.0
- Change "config" by "Config" - Remove `core_config_path` introduced in 68c2bdf - gets copied from the repo, deleted from the clone and symlink-ed back into the clone - useless, no?
- Loading branch information
Showing
1 changed file
with
3 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
set :scm, :git | ||
set :git_enable_submodules, 1 | ||
set :deploy_via, :checkout | ||
set :shared_children, %w(config system tmp) | ||
set :shared_children, %w(Config System tmp) | ||
|
||
set :git_flag_quiet, "" | ||
|
||
|
@@ -44,8 +44,7 @@ | |
def capcake() | ||
set :deploy_to, "/var/www/#{application}" if (deploy_to.empty?) | ||
set(:current_path) { File.join(deploy_to, current_dir) } | ||
set(:database_path) { File.join(File.join(shared_path, "config"), "database.php") } | ||
set(:core_config_path) { File.join(File.join(shared_path, "config"), "core.php") } | ||
set(:database_path) { File.join(File.join(shared_path, "Config"), "database.php") } | ||
set(:shared_path) { File.join(deploy_to, shared_dir) } | ||
_cset(:cake_path) { shared_path } | ||
_cset(:tmp_path) { File.join(shared_path, "tmp") } | ||
|
@@ -164,7 +163,6 @@ def remote_file_exists?(full_path) | |
end | ||
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 | ||
|
||
|
@@ -522,8 +520,7 @@ def remote_file_exists?(full_path) | |
#{deploy_to}/shared/config/database.php | ||
DESC | ||
task :symlink, :roles => :web, :except => { :no_release => true } do | ||
run "#{try_sudo} rm -f #{current_path}/config/database.php && #{try_sudo} ln -s #{database_path} #{current_path}/config/database.php" | ||
run "#{try_sudo} rm -f #{current_path}/config/core.php && #{try_sudo} ln -s #{core_config_path} #{current_path}/config/core.php" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jadb
Author
Owner
|
||
run "#{try_sudo} rm -f #{current_path}/Config/database.php && #{try_sudo} ln -s #{database_path} #{current_path}/Config/database.php" | ||
end | ||
end | ||
|
||
|
Actually, the core.php got copied from the repo, deleted from the clone and symlink-ed back into the shared_path/config/core.php which allowed to have a separate core config file on your local repo and your production box. Same as for the database. I find this very convenient so that I can have debug level 2 while coding, and don't have to think about switching back to 0 before deploying. Maybe you have another trick?