-
Notifications
You must be signed in to change notification settings - Fork 28
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
Working with multiple release branches #102
Comments
I think this is a weakness of the current parallel branch handling. If you tried to develop a Seems like a bug, though I'd have to think through how this could be resolved. |
For some reason Reckon doesn't seem to infer the correct version when using release branches. For example, I have a tag of 0.1.0, then created a branch: |
@sdavids13 The old gradle-git plugin had a concept of branch patterns that would let you coerce/hint to the plugin that you have a particular normal version in mind for this branch. Currently, reckon doesn't look at branch name at all. There are some conceptual benefits to keeping it generic, but it makes it hard to handle this kind of use case. If you wouldn't mind opening a separate issue, I think something tied to either branch names or you being able to provide hints of the version like |
@ctolkmit Finally taking a look at this, here's what I think is going on:
One of the big issues here is that I'm purely looking at commit history and not branch names (as mentioned above). This is partly because some CI systems don't preserve branch names properly at all times, and also it avoids having to know what your naming convention is. An assumption reckon makes is that you have to have contiguous version numbers (e.g. you can't jump from 2.0.7 to 3.1.0 since it requires a major jump then a minor jump). It might help to see your log with the |
Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed. In the new logic, if we bump the target normal in order to avoid a parallel version and that version is still in the parallel versions list, we increment increment by a higher scope (i.e. by MAJOR if they requested MINOR or by MINOR if they requested PATCH). This may resolve many of the bugs we had with parallel version handling. The two unintuitive parts are that it may still not increment as far as someone wants in some cases. And in others someone could be surprised that we incremented by a higher scope than they asked for. To deal with the latter, we may want to consider making a distinction between "soft" and "hard" scopes (i.e. did they explicitly ask for the scope or did it get inferred). This was clearer in the past, when "inferred" really only meant no input from the scope calc. However, with the new commit message scope calc, that's really more of a "soft" scope request than an explicit one. It's trickier because to the Reckoner there's no difference between commit message scope calcs and explicit user-requested scope calcs. Will run this by the users and see what they think. Fixes #180 Related to #102
Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed. In the new logic, if we bump the target normal in order to avoid a parallel version and that version is still in the parallel versions list, we increment increment by a higher scope (i.e. by MAJOR if they requested MINOR or by MINOR if they requested PATCH). This may resolve many of the bugs we had with parallel version handling. The two unintuitive parts are that it may still not increment as far as someone wants in some cases. And in others someone could be surprised that we incremented by a higher scope than they asked for. To deal with the latter, we may want to consider making a distinction between "soft" and "hard" scopes (i.e. did they explicitly ask for the scope or did it get inferred). This was clearer in the past, when "inferred" really only meant no input from the scope calc. However, with the new commit message scope calc, that's really more of a "soft" scope request than an explicit one. It's trickier because to the Reckoner there's no difference between commit message scope calcs and explicit user-requested scope calcs. Will run this by the users and see what they think. Fixes #180 Related to #102
Our prior parallel version logic allowed reckon to increment by the requested scope a second time in order to avoid a parallel version. However, if that version is also in the parallel branch, it would fail saying the version was already claimed. In the new logic, if we bump the target normal in order to avoid a parallel version and that version is still in the parallel versions list, we increment increment by a higher scope (i.e. by MAJOR if they requested MINOR or by MINOR if they requested PATCH). This may resolve many of the bugs we had with parallel version handling. The two unintuitive parts are that it may still not increment as far as someone wants in some cases. And in others someone could be surprised that we incremented by a higher scope than they asked for. To deal with the latter, we may want to consider making a distinction between "soft" and "hard" scopes (i.e. did they explicitly ask for the scope or did it get inferred). This was clearer in the past, when "inferred" really only meant no input from the scope calc. However, with the new commit message scope calc, that's really more of a "soft" scope request than an explicit one. It's trickier because to the Reckoner there's no difference between commit message scope calcs and explicit user-requested scope calcs. Will run this by the users and see what they think. Fixes #180 Related to #102
Hi,
either I am confused about using this plugin in a useful way with multiple release Branches.
Scenario:
My reckon config is:
I have got a project containing two Branches
release/3.0.x
andrelease 3.1.x
. There are still branchesrelease/2.0.x
andrelease/2.1.x
without using reckon, and existing tags like2.0.7
(released, final versions) on therelease/2.0.x
branch.In both 3.x branches I (manually) tagged (different) commits as
3.0.0-dev.0
and3.1.0-dev.0
respectively.When developing on both branches, reckon now determines useful versions like
3.0.0-dev.0.535+586704e
.I now created a release for branch 3.0.x:
./gradlew -Preckon.stage=rc reckonTagCreate
That correctly created:
3.0.0-rc.1
I now switch to my
release/3.1.x
branch and start a build, the following happens:Git log's latest tag is 3.1.0.dev:
So - what am I doing wrong? Or is this the expected behavior? We really need to develop two Releases (or even more) in parallel. Would love to use reckon ....
The text was updated successfully, but these errors were encountered: