forked from Vinsanity/wp-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89c0ba2
commit 57e5c5b
Showing
1 changed file
with
15 additions
and
11 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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
namespace :uploads do | ||
|
||
desc "Syncs uploads directory from local to remote" | ||
task :sync do | ||
|
||
run_locally do | ||
roles(:all).each do |role| | ||
|
||
execute :rsync, "-avzO #{role.user}@#{role.hostname}:#{shared_path}/content/uploads/ content/uploads" | ||
execute :rsync, "-avzO content/uploads/ #{role.user}@#{role.hostname}:#{shared_path}/content/uploads" | ||
|
||
end | ||
end | ||
desc "Push any changed or new files from local to remote" | ||
task :push do | ||
run_locally do | ||
roles(:all).each do |role| | ||
execute :rsync, "-avzO content/uploads/ #{role.user}@#{role.hostname}:#{shared_path}/content/uploads" | ||
end | ||
end | ||
end | ||
|
||
desc "Pull any changed or new files from remote to local" | ||
task :pull do | ||
run_locally do | ||
roles(:all).each do |role| | ||
execute :rsync, "-avzO #{role.user}@#{role.hostname}:#{shared_path}/content/uploads/ content/uploads" | ||
end | ||
end | ||
end | ||
|
||
end |