diff --git a/README.md b/README.md index 0295170..6d515d5 100755 --- a/README.md +++ b/README.md @@ -128,6 +128,12 @@ Type: `String` Log format to pass to [`git log`](http://git-scm.com/docs/git-log#_pretty_formats). Used to display revision diffs in `pending` task. Default: `%h: %s - %an`. +### copy + +Type: `String` + +Parameter to pass to `cp` to copy the previous release. Non NTFS filesystems support `-r`. Default: `-a` + ## Variables Several variables are attached during the deploy and the rollback process: diff --git a/tasks/deploy/update.js b/tasks/deploy/update.js index 4f7579b..edaa45a 100644 --- a/tasks/deploy/update.js +++ b/tasks/deploy/update.js @@ -38,11 +38,12 @@ module.exports = function (gruntOrShipit) { */ function copyPreviousRelease() { + var copyParameter = shipit.config.copy || '-a'; if (!shipit.previousRelease) { return Promise.resolve(); } shipit.log('Copy previous release to "%s"', shipit.releasePath); - return shipit.remote(util.format('cp -a %s/. %s', path.join(shipit.releasesPath, shipit.previousRelease), shipit.releasePath)); + return shipit.remote(util.format('cp %s %s/. %s', copyParameter, path.join(shipit.releasesPath, shipit.previousRelease), shipit.releasePath)); } /**