adding a flags option to override default rsync flags

master
Jason Semko 2013-11-18 17:42:55 -08:00
parent 63a9e82bd2
commit 5b1723ab34
2 changed files with 4 additions and 2 deletions

View File

@ -139,7 +139,9 @@ EOF
puts "## Deploying via rsync to #{dest_url} port=#{port}"
command = "rsync -avze '" + "ssh -p #{port}" + "' #{self.inst.build_dir}/ #{dest_url}"
flags = !self.deploy_options.flags ? '-avze' : self.deploy_options.flags
command = "rsync " + flags + " '" + "ssh -p #{port}" + "' #{self.inst.build_dir}/ #{dest_url}"
if self.deploy_options.clean
command += " --delete"

View File

@ -5,7 +5,7 @@ require "middleman-core"
module Middleman
module Deploy
class Options < Struct.new(:whatisthis, :method, :host, :port, :user, :password, :path, :clean, :remote, :branch, :build_before); end
class Options < Struct.new(:whatisthis, :method, :host, :port, :user, :password, :path, :clean, :remote, :branch, :build_before, :flags); end
class << self