-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hi,
The project I'm working on uses a 6-section version number scheme that has semantic meaning within the org. The first 5 sections of the version number will always be in the branch name: release/1.2.3.4.5, for example. The tags will always contain the full version: 1.2.3.4.5.6.
Could you provide some guidance on whether the plugin can help with this type of versioning scheme and what I should try in the configuration to handle this scheme and managing/incrementing the final section properly?
I've tried the following and it formats as I want, but it doesn't help me with incrementing the final section of the version (build number) or starting the build number over at 0 when the release branch ref differs from the last tag (release/1.2.1.0.1 should start with 1.2.1.0.1.0 but instead starts with the build # of the last tag).
gitVersioning.apply {
refs {
branch('release/(?<release>.*)') {
describeTagPattern = '^(?<major>[0-9]+)\\.(?<minor>[0-9]+)\\.(?<patch>[0-9]+)\\.(?<other>[0-9]+)\\.(?<milestone>[0-9]+)\\.(?<build>[0-9]+)'
version = '${ref.release}.${describe.tag.build}'
}
}
}
Thanks for your help,
David