lib/ash/magento.rb in capistrano-ash-1.1.13 vs lib/ash/magento.rb in capistrano-ash-1.1.14

- old
+ new

@@ -10,11 +10,11 @@ configuration.load do # -------------------------------------------- # Task chains # -------------------------------------------- after "deploy:setup", "deploy:setup_local" - after "deploy:setup_shared", "pma:install" +# after "deploy:setup_shared", "pma:install" after "deploy:finalize_update", "magento:activate_config" after "deploy:symlink", "magento:symlink" after "deploy", "magento:purge_cache" # -------------------------------------------- @@ -26,11 +26,11 @@ # attempt to create files needed for proper deployment system("cp .htaccess htaccess.dist") system("cp app/etc/local.xml app/etc/local.xml.staging") system("cp app/etc/local.xml 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" @@ -49,11 +49,11 @@ desc "[internal] Touches up the released code. This is called by update_code after the basic deploy finishes." task :finalize_update, :roles => :web, :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" @@ -104,30 +104,24 @@ task :purge_cache, :roles => :web, :except => { :no_release => true } do sudo "rm -Rf #{shared_path}/var/cache/*" end desc "Watch Magento system log" - task :watch_logs, :roles => :web, :except => { :no_release => true } do + task :watch_logs, :roles => :web, :except => { :no_release => true } do run "tail -f #{shared_path}/var/log/system.log" do |channel, stream, data| puts # for an extra line break before the host name - puts "#{channel[:host]}: #{data}" - break if stream == :err + puts "#{channel[:host]}: #{data}" + break if stream == :err end end desc "Watch Magento exception log" task :watch_exceptions, :roles => :web, :except => { :no_release => true } do run "tail -f #{shared_path}/var/log/exception.log" do |channel, stream, data| puts # for an extra line break before the host name - puts "#{channel[:host]}: #{data}" - break if stream == :err + puts "#{channel[:host]}: #{data}" + break if stream == :err end - end + end end - - # -------------------------------------------- - # Custom tasks - # -------------------------------------------- - - # update core_config_data; set value = "domain" where scope_id = 0 and path = "web/unsecure/base_url" end