Closed eloo closed 5 years ago
Try this one
/(\d+)\.\d+([^\d]*$)/: { Matcher m, Project p -> m.replaceAll("${(m[0][1] as int) + 1}.0${m[0][3] ? m[0][3] : ""}") }
It should work with and without SNAPSHOT suffix
just tested. working as expected. maybe you can add this to the documentation?
I'm now using the following to make version bumps for both possible based on the commandline args. maybe thats also interesting for you
release {
if (project.hasProperty("releaseMinor")) {
versionPatterns = [
/(\d+)\.\d+([^\d]*$)/: { Matcher m, Project p -> m.replaceAll("${(m[0][1] as int) + 1}.0${m[0][3] ? m[0][3] : ""}") }
]
} else {
versionPatterns = [
/(\d+)([^\d]*$)/: { Matcher m, Project p -> m.replaceAll("${(m[0][1] as int) + 1}${m[0][2]}") }
]
}
}
Hi, i'm trying to get the version bump working for minor version part but i'm not getting it to work :/ My guess was that i need to update the versionPattern but i didn't achieve any proper result. Maybe you have a hint for me or is it simply not possible?
What i want to to is that the version update will produce the following: 1.2.3 -> 1.3.0 or a easy solution could also be 1.2.0 -> 1.3.0
Thanks