diff --git a/lib/middleman-deploy/commands.rb b/lib/middleman-deploy/commands.rb index 44a734a..e55dffb 100644 --- a/lib/middleman-deploy/commands.rb +++ b/lib/middleman-deploy/commands.rb @@ -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" diff --git a/lib/middleman-deploy/extension.rb b/lib/middleman-deploy/extension.rb index 9722804..12eed41 100644 --- a/lib/middleman-deploy/extension.rb +++ b/lib/middleman-deploy/extension.rb @@ -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