Merge pull request #48 from jasonsemko/jason

Adding "flags" option for rsync
This commit is contained in:
Tom Vaughan 2013-11-19 15:26:03 -08:00
commit 64ffb98d14
3 changed files with 5 additions and 2 deletions

View file

@ -50,6 +50,7 @@ activate :deploy do |deploy|
# deploy.user = "tvaughan" # no default # deploy.user = "tvaughan" # no default
# deploy.port = 5309 # ssh port, default: 22 # deploy.port = 5309 # ssh port, default: 22
# deploy.clean = true # remove orphaned files on remote host, default: false # deploy.clean = true # remove orphaned files on remote host, default: false
# deploy.flags = "-rltgoDvzO --no-p --del -e" # add custom flags, default: -avze
end end
``` ```

View file

@ -139,7 +139,9 @@ EOF
puts "## Deploying via rsync to #{dest_url} port=#{port}" 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 if self.deploy_options.clean
command += " --delete" command += " --delete"

View file

@ -5,7 +5,7 @@ require "middleman-core"
module Middleman module Middleman
module Deploy 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 class << self