From a63ae8e198b8fc5a9a0b73b2008adb561515875f Mon Sep 17 00:00:00 2001 From: Tunghsiao Liu Date: Wed, 1 Jun 2016 12:20:24 +0800 Subject: [PATCH] feat(deploy): update rsync deploy parameter BREAKING CHANGE: now the original are removed, all additional parameters should be passed through option, you can view for more information about this change. --- Gruntfile.coffee | 4 ++-- _deploy.yml | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index a4e6b4893..3f8eb0d7d 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -306,11 +306,11 @@ module.exports = (grunt) -> # Direct rsync compiled static files to remote server amsf__deploy__rsync: - command: "rsync -avz -e 'ssh -p <%= config.deploy.rsync.port %>' --delete --progress <%= config.deploy.ignore_files %> <%= config.dist %>/ <%= config.deploy.rsync.user %>@<%= config.deploy.rsync.host %>:<%= config.deploy.rsync.dest %> > deploy-rsync.log" + command: "rsync -avz -e 'ssh -p <%= config.deploy.rsync.port %>' --delete --progress <%= config.deploy.rsync.params %> <%= config.dist %>/ <%= config.deploy.rsync.user %>@<%= config.deploy.rsync.host %>:<%= config.deploy.rsync.dest %> > deploy-rsync.log" # Copy compiled static files to local directory for further post-process amsf__deploy__sparanoid__copy_to_local: - command: "rsync -avz --delete --progress <%= config.deploy.ignore_files %> <%= jekyll.dist.options.dest %>/ <%= config.deploy.s3_website.dest %>/site/<%= config.base %> > deploy-s3_website.log" + command: "rsync -avz --delete --progress <%= config.deploy.rsync.params %> <%= jekyll.dist.options.dest %>/ <%= config.deploy.s3_website.dest %>/site/<%= config.base %> > deploy-s3_website.log" # Auto commit untracked files sync'ed from sync_local amsf__deploy__sparanoid__auto_commit: diff --git a/_deploy.yml b/_deploy.yml index 839fa889b..875561f58 100644 --- a/_deploy.yml +++ b/_deploy.yml @@ -2,14 +2,17 @@ # Custom deployment variables # -# Prevent them from being deleted on server (rsync --delete), these files and directories are available on the remote server but outside this git repo. I need to ignore them. -ignore_files: --exclude=lab rsync: user: rsync port: 22 host: caladbolg.sparanoid.com dest: /srv/www/sparanoid.com/public_html + # Extra rsync parameters + # I use `--exclude` here to prevent additional files from being deleted on + # the server (rsync --delete), these files and directories are available on + # the remote server but outside this git repo. So I need to ignore them. + params: --exclude=lab s3_website: dest: ~/Git/sparanoid.com-prod