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

develop more generic "update" class for long-tail of version replacements #305

Closed
bcoe opened this issue Nov 4, 2019 · 0 comments · Fixed by #1157
Closed

develop more generic "update" class for long-tail of version replacements #305

bcoe opened this issue Nov 4, 2019 · 0 comments · Fixed by #1157
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone

Comments

@bcoe
Copy link
Contributor

bcoe commented Nov 4, 2019

Looking at google-api-java-client, there was a long tail of files we failed to update the version in:

./google-api-client/src/test/java/com/google/api/client/googleapis/GoogleUtilsTest.java:    String version = "1.30.3";
./google-api-client/src/test/java/com/google/api/client/googleapis/GoogleUtilsTest.java:    String version = "1.30.3-SNAPSHOT";
./google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java:  public static final String VERSION = "1.30.3".toString();
./google-api-client-bom/README.md:      <version>1.30.3</version>

We continue to add one off fixes, like #304, but it might be nice to have a slightly more generic update class that handles a variety of simple string replacements.

e.g., <version>0.3.0</version>, VERSION = "0.20.4", maybe the class could support a variety of regexes like releasetool.

@bcoe bcoe added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Nov 4, 2019
@chingor13 chingor13 added this to the Next milestone Dec 22, 2021
chingor13 added a commit that referenced this issue Dec 29, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants