Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generic release hooks #67

Open
mpkorstanje opened this issue May 22, 2022 · 0 comments
Open

Support generic release hooks #67

mpkorstanje opened this issue May 22, 2022 · 0 comments
Milestone

Comments

@mpkorstanje
Copy link
Contributor

mpkorstanje commented May 22, 2022

🤔 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant