lib/ash/hosted_magento.rb in capistrano-ash-1.1.8 vs lib/ash/hosted_magento.rb in capistrano-ash-1.1.10

- old
+ new

@@ -36,11 +36,11 @@ # set correct permissions run "chmod 755 #{shared_path}/*" end 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 + task :finalize_update, :roles => :web, :except => { :no_release => true } do # synchronize media directory with shared data run "rsync -rltDvzog #{latest_release}/media/ #{shared_path}/media/" # put ".htaccess" in place run "mv #{latest_release}/htaccess.dist #{latest_release}/.htaccess" @@ -54,15 +54,22 @@ # set the file and directory permissions ash.fixperms end end + namespace :magento do + desc "Purge Magento cache directory" + task :purge_cache, :roles => :web, :except => { :no_release => true } do + run "rm -Rf #{shared_path}/var/cache/*" + end + end + # -------------------------------------------- # Overloaded Ash tasks # -------------------------------------------- namespace :ash do desc "Set standard permissions for Ash servers" - task :fixperms, :except => { :no_release => true } do + task :fixperms, :roles => :web, :except => { :no_release => true } do # chmod the files and directories. run "find #{latest_release} -type d -exec chmod 755 {} \\;" run "find #{latest_release} -type f -exec chmod 644 {} \\;" end end