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-finish must not increment develop snapshot version #267

Closed
mzatko opened this issue Nov 12, 2020 · 7 comments · Fixed by #268
Closed

Hotfix-finish must not increment develop snapshot version #267

mzatko opened this issue Nov 12, 2020 · 7 comments · Fixed by #268

Comments

@mzatko
Copy link

mzatko commented Nov 12, 2020

Snapshot version is incremented after hotfix-finish.
develop = 1.6.0-SNAPSHOT
master = 1.5.0
after hotfix-start/hotfix-finish (hotfix-1.5.1 is created) develop version is incremented to 1.6.1-SNAPSHOT which is not correct

This bug report looks like opposing #211 but it is not. Scenario described there is not hotfix but new release in fact. Creating version 1.0.6 from snapshot 1.0.6-SNAPSHOT is releasing not hotfixing and hotfix-start/hotfix-finish just should not be used in the scenario.

@lalmeras
Copy link
Contributor

I just step into the same issue. A quick glance at the code shows that GitFlowHotfixFinishMojo erroneously udpates dev version instead of keeping the current one.

Proposed PR seems a valid fix for this issue.

@aleksandr-m
Copy link
Owner

Currently, I don't have strong opinion on this. Do you have some use case which convinces me? :) Maybe an alternative one?

Another option is to put it under the flag, but there is no point in providing flag when no one uses it.

@lalmeras @mzatko @vkuragin

@lalmeras
Copy link
Contributor

I see no other use-case than the one described by @mzatko, as hotfix increases patch number (1.5.0 -> 1.5.1), so there is no need to increase dev version that already uses 1.6.0-SNAPSHOT. I do not see the point to increase a dev version that already must be > to hotfix version, but maybe I miss a point ?

Maybe this proposal clashes with the use-case where developmentBranch = productionBranch. I do not use this behavior, so I am not sure which codepath is triggered with this setting. If there is no special treatment, maybe the behavior is:

  • merge hotfix and set no-SNAPSHOT version
  • then increase version on dev (=master) version so that a new development cycle can start ?
    Hence the need to increase dev version ?

@lalmeras
Copy link
Contributor

I read again PR proposal, and from my point of view, there is effectively different behavior expected based on developmentBranch = productionBranch use-case.

I add a comment on @mzatko proposal on a way to correctly handle both cases. @aleksandr-m can you give it a sight to confirm that it is the correct way to fix this issue in a way that handles all expected behavior ?

@mzatko
Copy link
Author

mzatko commented Jan 12, 2021

I think the main problem in @vkuragin's example is the way of versions numbering he uses. There is last(least-significant) number in version used for both releases and hotfixes versions...
Mainly it is used like: release 1.0.0, release 1.1.0, release 1.2.0, hotfix 1.2.1, hotfix 1.2.2, release 1.3.0
He uses it like: release 1.0.0, release 1.0.1, release 1.0.2, hotfix 1.0.3, hotfix 1.0.4, release 1.0.5
It is only my assumption from log posted...
Am I right @vkuragin?
Then we have to increment only in case hotfix version is the same as develop version(with "-SNAPSHOT" postfix) or something like that...

I would personally prefer just to set:

<configuration>
    <versionDigitToIncrement>1</versionDigitToIncrement>
</configuration>

means switch to "standard" version numbering

@lalmeras @aleksandr-m

@aleksandr-m
Copy link
Owner

@mzatko @lalmeras 1.15.1 is out with fix.

@mzatko
Copy link
Author

mzatko commented Jan 15, 2021

@aleksandr-m great, thank you!

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

Successfully merging a pull request may close this issue.

3 participants