Skip to content
Permalink
Browse files

feat(events): add finished event for rollback

  • Loading branch information
Marten Klitzke
Marten Klitzke committed Jan 8, 2019
1 parent 694ad7d commit 92ba6ddb2d2bdd880d3c2c4b635100394240c6e3
Showing with 10 additions and 1 deletion.
  1. +8 −1 README.md
  2. +2 −0 index.js
@@ -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
---------|----------
@@ -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
@@ -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}`)
})
}

0 comments on commit 92ba6dd

Please sign in to comment.
You can’t perform that action at this time.