-
Notifications
You must be signed in to change notification settings - Fork 155
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
Behavior change in incrementMinorIfNotOnRelease
incrementer when on release branch
#391
Comments
incrementMinorIfNotOnRelease
incrementMinorIfNotOnRelease
incrementer when on release branch
I'll look at this tomorrow! Thanks for detailed issue submission! |
I've made a blind guess https://github.com/allegro/axion-release-plugin/pull/393/files (didn't test it yet) what do You think @mateuszkwiecinski ? |
@mateuszkwiecinski a quick "manual" test seems not ok, gonna check it out tomorrow! :) |
@mateuszkwiecinski I've tested again, I think that this PR fixes the issue ;) |
@mateuszkwiecinski could you test it from this branch? I'll need some time to create a useful tests for this feature but also - I would like to fix broken release ;) |
Sure, I should be able to test it later today (somewhen around late evening), if not I'll do it as the very first thing tomorrow morning 👀 Is there a snapshot version available or should I build and publish the plugin locally? Also, could you explain why it is expected to use tag config at release branch naming? Previously release branch format and tag name format were considered two separate things. AFAIU these are now unified. Is it expected to have branches named in a (or at least that's what I read from: According to what I understand from the code it will work in my case and it'll recognise |
There is no way (AFAIK) to have gradle plugins snapshots. So please use mavenLocal(). |
https://axion-release-plugin.readthedocs.io/en/latest/configuration/version/#incrementminorifnotonrelease Before my fix incrementMinorIfNotOnRelease |
They can't be published on Gradle Plugin Portal indeed, but they can be published to any other maven repository. Most projects use Sonatype snapshot repository
Thanks for confirming!
Ok, I briefly tried that initially when trying to work around the issue, but it didn't work for me 🤔 |
Thanks for the idea with sonatype - it seems kinda obvious now as You mentioned it! Please do check if everything seems all right on your end! |
@bgalek So: I managed to run tests linked in the original post, they all passed which means the legacy format is properly recognized now 👍 As mentioned above, I had tried to set custom it has following repository state: and as you can see in the repository, my configuration looks as follows scmVersion {
tag {
prefix = 'ohoh'
}
versionIncrementer = PredefinedVersionIncrementer.versionIncrementerFor('incrementMinorIfNotOnRelease')
releaseBranchPattern = Pattern.compile('^random(/.*)?$')
} I expected that the versionIncrementer = PredefinedVersionIncrementer.versionIncrementerFor("incrementMinorIfNotOnRelease", mapOf("releaseBranchPattern" to "^random(/.*)?$".toRegex().toPattern()) Is that expected? What's the purpose of Other than that, the changes on your branch seems to be working fine in all of my usecases (except #392) |
Than You for testing ang analysis! I'm gonna dig into
but it's from 2015 and maybe something broke. I'm wondering if before 1.13.x this was working? |
legacy tag prefiex preserved in incrementMinorIfNotOnRelease #391
I've merged the fix as it preserves old functionality. I'll get back to this issue when confirmed that the bug was introduced in 1.13.x. |
It did not 😛 I tested on I only started using the option in I created separate issue: #396 and I'm gona close this one as you fixed the original problem already. Thank you 🙏 |
Context:
I'm using
incrementMinorIfNotOnRelease
incrementer by settingRepro steps:
release-1.2.0
on arelease/1.2.0
branch../gradlew currentVersion
tasks and ensure it prints1.2.0
./gradlew currentVersion
task againExpected result:
Task completes with
1.2.1-SNAPSHOT
output, as it was in1.12.1
Actual result:
Task prints
1.3.0-SNAPSHOT
It looks like an oversight as a tag related function is used to set branch related property
de4ee1e#diff-50b4d296a39fb72c511d8a25cd41aa5ccb5bc33637d078f6fbb61bf9158108d3L24
It seem like the workaround/fix is to set
releaseBranchPattern
explicitly, however I still haven't managed to make it work 👀In case when needed: test failing on 1.13.1 + plugin config
The text was updated successfully, but these errors were encountered: