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

Hotfix-start add hotfixVersionDigitToIncrement parameter #186

Closed
SergeZh4Dev opened this issue Jul 4, 2019 · 2 comments
Closed

Hotfix-start add hotfixVersionDigitToIncrement parameter #186

SergeZh4Dev opened this issue Jul 4, 2019 · 2 comments

Comments

@SergeZh4Dev
Copy link

Often hotfix version has 1 more digit than release one. E.g. release is 1.2 and hotfix is 1.2.1.
But at the moment it is not supported. Hotfix now is next version in production branch (in our case 1.3).
If there were hotfixes earlier and production version is already 1.2.1 then next hotfix is endeed 1.2.2. But if there were no hotfixes yet to support right behaiviour we need to specify release version with last zero - 1.2.0. This forces us to declare development version with 3 digits 1.2.0-SNAPSHOT.
But if we have no need to have 3 digits in development version then we need a way to tell plugin which digit it should increment at hotfix start. So we need something like versionDigitToIncrement, but for hotfix. And getHotfixVersion func must use it but check if this parameter equals to current production version digits counts (as this parameter as well as versionDigitToIncrement would be zero-based) then just add one more digit to version with value of "1".
After this we can have development version with 2 digits - 1.2-SNAPSHOT (and versionDigitToIncrement set to 1). Release would be 1.2 (with is equals to 1.2.0 for maven). And first hotfix would create 1.2.1 (if hotfixVersionDigitToIncrement is set to 2). And subsequent hotfixes would be 1.2.2, 1.2.3 and so on.

@erikhusby
Copy link

As part of my conversion from jgitflow-maven-plugin to gitflow-maven-plugin, I had to write a script to do this calculation. It had been part of the jgitflow plugin. I have in place special builds that start a release or a hotfix and also finish the release or hotfix. This allows others in the team to easily do these tasks when I am not around. Having this feature would simplify my builds.

@dkirchner-qc
Copy link

What worked for us is to change the version of you project to 3 digits, aka 1.2 to 1.2.0 a hotfix on that would increment to 1.2.1

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

3 participants