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

fix(maven): bumpVersion update SNAPSHOT versions #27274

Merged
merged 11 commits into from Apr 29, 2024

Conversation

jonasrutishauser
Copy link
Contributor

Changes

allow to bump maven SNAPSHOT-Versions (since this is the usual maven way)

Context

#14762 & #14763

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

lib/modules/manager/maven/update.ts Outdated Show resolved Hide resolved
lib/modules/manager/maven/update.ts Outdated Show resolved Hide resolved
@viceice viceice added the breaking Breaking change, requires major version bump label Feb 24, 2024
@viceice
Copy link
Member

viceice commented Feb 24, 2024

in current state this PR has (probably unexpected) breaking changes

@rarkins rarkins marked this pull request as draft February 27, 2024 07:24
@jonasrutishauser
Copy link
Contributor Author

jonasrutishauser commented Mar 3, 2024

Here is a table with the old (useless) behaviour and the new:

categorie current value prerelease (old) patch (old) minor (old) major (old) prerelease (new) patch (new) minor (new) major (new)
Snapshot 1.2.3-SNAPSHOT 1.2.3-SNAPSHOT.0 1.2.3 1.3.0 2.0.0 1.2.3-SNAPSHOT 1.2.4-SNAPSHOT 1.3.0-SNAPSHOT 2.0.0-SNAPSHOT
Snapshot with additional qulifier 1.2.3-foo-SNAPSHOT 1.2.3-foo-SNAPSHOT.0 1.2.3 1.3.0 2.0.0 1.2.3-foo-SNAPSHOT 1.2.4-foo-SNAPSHOT 1.3.0-foo-SNAPSHOT 2.0.0-foo-SNAPSHOT
Release 1.2.3 1.2.4-0 1.2.4 1.3.0 2.0.0 1.2.4-SNAPSHOT 1.2.4 1.3.0 2.0.0
Release with additional qualifier 1.2.3-foo 1.2.3-foo.0 1.2.3 1.3.0 2.0.0 1.2.3-foo.0 1.2.3 1.3.0 2.0.0
Non compliant 1.2.3.4 1.2.3.4 1.2.3.4 1.2.3.4 1.2.3.4 1.2.3.4 1.2.3.4 1.2.3.4 1.2.3.4

We can see that the old behaviour was only useful in the case of a release version (as long as the bump was not prerelease).

For the case of a release number having an additional qualifier, I'm not sure what the expected behaviour should be.
A possibility (if it should be support) would be the following:

current value prerelease patch minor major
1.2.3-foo 1.2.4-foo-SNAPSHOT 1.2.4-foo 1.3.0-foo 2.0.0-foo

@rarkins rarkins changed the title fix(maven): update SNAPSHOT versions fix(maven): bumpVersion update SNAPSHOT versions Mar 4, 2024
lib/modules/manager/maven/update.ts Outdated Show resolved Hide resolved
lib/modules/manager/maven/update.ts Outdated Show resolved Hide resolved
lib/modules/manager/maven/update.ts Outdated Show resolved Hide resolved
@rarkins
Copy link
Collaborator

rarkins commented Apr 14, 2024

@jonasrutishauser FYI we are planning to release v38 this week, so if you're interested in having these changes as part of it then please get back to us soon. Otherwise, it can be merged later in v38 if you remove the breaking changes, or in v39 sometime in future if you're certain that the changes need to be breaking/backwards-incompatible

@rarkins rarkins marked this pull request as ready for review April 21, 2024 14:28
@rarkins rarkins removed the breaking Breaking change, requires major version bump label Apr 21, 2024
rarkins
rarkins previously approved these changes Apr 21, 2024
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this being non-breaking

@rarkins rarkins requested a review from viceice April 21, 2024 14:30
lib/modules/manager/maven/update.ts Outdated Show resolved Hide resolved
lib/modules/manager/maven/update.ts Outdated Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Apr 29, 2024

please avoid mentioning in commits

@rarkins rarkins added this pull request to the merge queue Apr 29, 2024
Merged via the queue into renovatebot:main with commit 8965a39 Apr 29, 2024
37 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.328.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jonasrutishauser jonasrutishauser deleted the feat/bump-maven-snapshot branch April 29, 2024 16:18
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

Successfully merging this pull request may close these issues.

None yet

4 participants