-
Notifications
You must be signed in to change notification settings - Fork 322
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
Have the ability to insert major, minor and revision constants into source files. #435
Comments
@dpcollins-google the way folks tend to do this in the Node.js community is to I'd would be curious to know the best way to approach this for Python, happy to add language specific stuff like this. |
We now support an For other languages, we would want something similar - a generic way to mark what versions need to be updated. |
Note: code search is a very expensive API call, so we cannot be consistently searching across all the source for a variety of patterns. Since the source file will likely differ from project to project, a configurable list of extra files to consider seems reasonable. |
Also related to #305 |
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://www.github.com/googleapis/release-please/compare/v13.0.2...v13.1.0) (2021-12-29) ### Features * introduce generic updater ([#1157](https://www.github.com/googleapis/release-please/issues/1157)) ([c97598c](https://www.github.com/googleapis/release-please/commit/c97598c137b5018c76f5d62137e277b991f4bfa3)), closes [#435](https://www.github.com/googleapis/release-please/issues/435) [#305](https://www.github.com/googleapis/release-please/issues/305) [#1139](https://www.github.com/googleapis/release-please/issues/1139) [#1174](https://www.github.com/googleapis/release-please/issues/1174) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
It should be possible to access the version of a library in code. Currently this is (afaik) only possible in java with https://googleapis.dev/java/gax/latest/com/google/api/gax/core/GaxProperties.html#getLibraryVersion-java.lang.Class-, which reaches into the maven metadata to do so.
It would be useful to be able to paste MAJOR_VERSION = x MINOR_VERSION = y, REVISION = z constants in each language, or even just the numbers representing them by regex substitution into source files upon release.
The text was updated successfully, but these errors were encountered: