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

Commit

Permalink
Change symlink switching to a no-gap atomic exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
travco committed Aug 2, 2016
1 parent cd19ead commit e68dba3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tasks/deploy/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ module.exports = function (gruntOrShipit) {
return shipit.remote(
'cd ' + shipit.config.deployTo + ' && ' +
'if [[ -d current && ! (-L current) ]]; then ' +
'ln -nfs ' + relativeReleasePath + ' current;' +
'else ' +
'echo \"ERR: could not make symlink\"; ' +
'else ' +
'ln -nfs ' + relativeReleasePath + ' current_tmp && ' +
'mv -fT current_tmp current; ' +
'fi'
)
.then(function (res) {
Expand Down

0 comments on commit e68dba3

Please sign in to comment.