lib/ash/magento.rb in capistrano-ash-0.0.19 vs lib/ash/magento.rb in capistrano-ash-1.0.0
- old
+ new
@@ -8,19 +8,26 @@
configuration.load do
# --------------------------------------------
# Task chains
# --------------------------------------------
+ after "deploy:setup", "deploy:setup_local"
after "deploy:setup_shared", "pma:install"
after "deploy:finalize_update", "magento:activate_config"
after "deploy:symlink", "magento:symlink"
after "deploy", "magento:purge_cache"
# --------------------------------------------
# Overloaded tasks
# --------------------------------------------
namespace :deploy do
+ desc "Setup local files necessary for deployment"
+ task :setup_local do
+ # attempt to create files needed for proper deployment
+ system("touch app/etc/local.xml.staging app/etc/local.xml.production")
+ end
+
desc "Setup shared application directories and permissions after initial setup"
task :setup_shared do
# remove Capistrano specific directories
run "rm -Rf #{shared_path}/log"
run "rm -Rf #{shared_path}/pids"
@@ -39,11 +46,11 @@
desc "[internal] Touches up the released code. This is called by update_code after the basic deploy finishes."
task :finalize_update, :except => { :no_release => true } do
# synchronize media directory with shared data
sudo "rsync -rltDvzog #{latest_release}/media/ #{shared_path}/media/"
sudo "chmod -R 777 #{shared_path}/media/"
-
+
# remove directories that will be shared
run "rm -Rf #{latest_release}/includes"
run "rm -Rf #{latest_release}/media"
run "rm -Rf #{latest_release}/sitemap"
run "rm -Rf #{latest_release}/var"
@@ -112,6 +119,6 @@
# Custom tasks
# --------------------------------------------
# update core_config_data; set value = "domain" where scope_id = 0 and path = "web/unsecure/base_url"
-end
+end
\ No newline at end of file