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

Commit

Permalink
Merge pull request #107 from bjoernsteinborn/issue-109
Browse files Browse the repository at this point in the history
Add cp parameter to shipit options
  • Loading branch information
gregberge committed Feb 21, 2016
2 parents 4a6184d + 752c1fb commit e637e5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
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
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 -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));
}

/**
Expand Down

0 comments on commit e637e5e

Please sign in to comment.