cucumber / cucumber/polyglot-release
Support generic release hooks
- Dominant language
- Shell
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### 🤔 What's the problem you've observed?
Not every project uses a well known language with a well defined release process that can be reasonably implemented in `polyglot-release`. Additionally some projects may want to do additional work in addition to the release process for their language. For example #56, were `cucumber-jvm-scala` needs to update some documentation references.
As such it might be useful to define a generic set of hooks that can be used in any project.
### ✨ Do you have a proposal for making it better?
We add a pseudo-language to polyglot release that consists of several optional bash scripts:
```
polyglot-release/
|- before-pre-release
|- pre-release
|- after-pre-release
|- before-release
|- release
|- after-release
|- before-post-release
|- post-release
|- after-post-release
```
The `before-` and `after-` scripts are hooks that allow the opportunity to modify files before and after the language specific release process runs but before any commit is made. The `pre-release`, `release` and `post-release` are executed as part of the `polyglot-release` pseudo-language.
Each script is invoked with `$1 = $NEW_VERSION` and with `pwd = [the project root]`. So for example `./polyglot-release/release 1.2.3`. And if possible the `check_for_tools` function is also exported.
### 📚 Any additional context?
In #65 we added a bespoke mechanism for polyglot release to release itself. This could be replaced by these scripts.
Contributor guide
Assessment
This issue has not been assessed yet.