lib/capistrano/tasks/craft.rake in capistrano-craft-0.1.1 vs lib/capistrano/tasks/craft.rake in capistrano-craft-0.1.2
- old
+ new
@@ -15,11 +15,12 @@
execute "chmod -fR 744 #{release_path}/web/cpresources/* || true"
end
end
namespace :cache do
- task :clear do
+ desc "Run the cache/flush Craft command"
+ task :flush do
on release_roles(fetch(:craft_deploy_roles)) do
craft_console "cache/flush"
end
end
end
@@ -27,25 +28,25 @@
namespace :assets do
desc "Synchronise assets between local and remote server"
task :sync do
run_locally do
release_roles(fetch(:craft_deploy_roles)).each do |role|
- puts "User -> " + role.user
- execute :rsync, "-rvzO #{role.user}@#{role.hostname}:#{shared_path}/#{fetch(:assets_path)}/ #{fetch(:assets_path)}"
- execute :rsync, "-rvzO #{fetch(:assets_path)}/ #{role.user}@#{role.hostname}:#{shared_path}/#{fetch(:assets_path)}"
+ execute :rsync, "-rzO #{role.user}@#{role.hostname}:#{shared_path}/#{fetch(:assets_path)}/ #{fetch(:assets_path)}"
+ execute :rsync, "-rzO #{fetch(:assets_path)}/ #{role.user}@#{role.hostname}:#{shared_path}/#{fetch(:assets_path)}"
end
end
end
end
desc "Pull database and sync assets"
task :pull do
invoke "db:pull"
- invoke "craft:sync_assets"
+ invoke "craft:assets:sync"
end
desc "Push database and sync assets"
task :push do
invoke "db:push"
- invoke "craft:sync_assets"
- end
+ invoke "craft:assets:sync"
+ end
+
end
\ No newline at end of file