Skip to content
This repository has been archived by the owner on Mar 18, 2018. It is now read-only.

Commit

Permalink
Add cp parameter to shipit options
Browse files Browse the repository at this point in the history
* defaults to '-a'
* update readme
  • Loading branch information
bjoern committed Feb 1, 2016
1 parent 960a308 commit 752c1fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion tasks/deploy/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 -r %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));
}

/**
Expand Down

0 comments on commit 752c1fb

Please sign in to comment.