Browse code

Rakefile option for any additional rsync arguments

Added variable `rsync_args`

Johan Svensson authored on 09/12/2012 at 18:04:41
Showing 1 changed files
... ...
@@ -8,6 +8,7 @@ ssh_user       = "user@domain.com"
8 8
 ssh_port       = "22"
9 9
 document_root  = "~/website.com/"
10 10
 rsync_delete   = false
11
+rsync_args     = ""  # Any extra arguments to pass to rsync
11 12
 deploy_default = "rsync"
12 13
 
13 14
 # This will be configured for you when you run config_deploy
... ...
@@ -237,7 +238,7 @@ task :rsync do
237 237
     exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
238 238
   end
239 239
   puts "## Deploying website via Rsync"
240
-  ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}")
240
+  ok_failed system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{rsync_args} #{"--delete" unless rsync_delete == false} #{public_dir}/ #{ssh_user}:#{document_root}")
241 241
 end
242 242
 
243 243
 desc "deploy public directory to github pages"