-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add a generic script-based release strategy #1139
Comments
FYI, this might be difficult to accomplish. We generate the file changes in code and do not have a clone of the repository while creating the release pull request. |
Thanks for your feedback @chingor13. I have 3 files I need to update with the version number:
Is there already a way to achieve this with release-please? |
I don't see a great way right now, but 2 options moving forward.
Another option could be to use a manifest (multi-component) configuration with a plugin like the one requested in #1075. This would only work if the 3 files you want to update are in different directories though and would not be as globally applicable as options 1 and 2. |
This introduces a new `Generic` updater class that scans the file line by line for annotations. You can annotate a line (inline) via: * `x-release-please-version` * `x-release-please-major` * `x-release-please-minor` * `x-release-please-patch` For these annotations, we will try to replace the value on that line only. You can annotate a block by starting with a line containing: * `x-release-please-start-version` * `x-release-please-start-major` * `x-release-please-start-minor` * `x-release-please-start-patch` and close the block with a line containing `x-release-please-end`. Within the block, we will attempt to replace version values. Additionally, all basic strategies now support the `extra-files` option which will apply this generic updater class. Fixes #435 Fixes #305 Fixes #1139 Fixes #1174
🤖 I have created a release \*beep\* \*boop\* --- ## [13.1.0](https://github.com/googleapis/release-please/compare/v13.0.2...v13.1.0) (2021-12-29) ### Features * introduce generic updater ([#1157](https://github.com/googleapis/release-please/issues/1157)) ([c97598c](https://github.com/googleapis/release-please/commit/c97598c137b5018c76f5d62137e277b991f4bfa3)), closes [#435](https://github.com/googleapis/release-please/issues/435) [#305](https://github.com/googleapis/release-please/issues/305) [#1139](https://github.com/googleapis/release-please/issues/1139) [#1174](https://github.com/googleapis/release-please/issues/1174) --- This PR was generated with [Release Please](https:/googleapis/release-please). See [documentation](https:/googleapis/release-please#release-please).
It would be useful to be able to launch a custom script from the GitHub repo to update specific files without having to create a new type of release strategy in release-please.
Something like:
The script would then receive the version number as parameter and be able to perform actions on the repository before release-please commits the files to the branch.
The text was updated successfully, but these errors were encountered: