Skip to content

Commit

Permalink
feat(events): add finished event for rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
Marten Klitzke committed Jan 8, 2019
1 parent 694ad7d commit 92ba6dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ This will also delete the release folder you are rolling back from.
### Events
You can run tasks on specific steps of the deployment process.
You can run tasks on specific steps of the deployment process:
Step | Description
---------|----------
Expand All @@ -81,6 +81,13 @@ Step | Description
symlinked | after the current symlink has been updated.
finished | after the deploy is finished.
You can also run tasks once a rollback is finsihed:
Step | Description
---------|----------
finished | after the rollback is finished.
#### Example
```javascript
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ module.exports = function(shipit) {
await shipit.remote(`ln -nfs ${shipit.releasesPath}/${previousRelease} ${shipit.currentPath}`)
await shipit.remote(`rm -rf ${shipit.releasesPath}/${current}`)

shipit.emit('finished')

return shipit.logInfo(`Done. Rolled back to version ${previousRelease}`)
})
}
Expand Down

0 comments on commit 92ba6dd

Please sign in to comment.