@bonvoy/plugin-exec
v0.12.0
Published
🚢 Execute custom shell commands during release lifecycle
Readme
@bonvoy/plugin-exec 🚢
Execute custom shell commands during release lifecycle
Optional plugin for bonvoy that lets you run shell commands at various points in the release process.
Features
- 🔧 Lifecycle Hooks - Run commands before/after any release phase
- 🐚 Shell Support - Full shell syntax (pipes, redirects, etc.)
- 🔍 Dry Run - Commands are skipped in dry-run mode
- 📝 Logging - Commands are logged before execution
Installation
npm install -D @bonvoy/plugin-execUsage
// bonvoy.config.js
export default {
plugins: [
['@bonvoy/plugin-exec', {
beforePublish: 'npm run build',
afterRelease: 'echo "Released!" | slack-notify',
}]
]
};Available Hooks
| Hook | When |
|------|------|
| beforeShipIt | Before release starts |
| afterVersion | After versions are bumped |
| beforeChangelog | Before changelog generation |
| afterChangelog | After changelog is written |
| beforePublish | Before npm publish |
| afterPublish | After npm publish |
| beforeRelease | Before GitHub release |
| afterRelease | After release completes |
Examples
Build before publish
export default {
plugins: [
['@bonvoy/plugin-exec', {
beforePublish: 'npm run build',
}]
]
};Notify on release
export default {
plugins: [
['@bonvoy/plugin-exec', {
afterRelease: 'curl -X POST https://hooks.slack.com/... -d "Released!"',
}]
]
};Multiple commands
export default {
plugins: [
['@bonvoy/plugin-exec', {
beforePublish: 'npm run lint && npm run build && npm run test',
}]
]
};License
MIT
