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

Supporting a different version pattern #157

Open
dzeigler opened this issue Sep 30, 2024 · 0 comments
Open

Supporting a different version pattern #157

dzeigler opened this issue Sep 30, 2024 · 0 comments
Assignees

Comments

@dzeigler
Copy link

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

@qoomon qoomon self-assigned this Sep 30, 2024
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

No branches or pull requests

2 participants