-
Notifications
You must be signed in to change notification settings - Fork 654
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
[ISSUE]: Bumping major/breaking via commit message not working as described during 0.x #4184
Comments
This test verifies issue GitTools#4184.
I think we need to change the documentation. |
As in: It bumping to 1.0.0 instead of 0.2.0 is intended? That goes against what semver.org recommends. But in that case, can an option be added to get SemVer-compliant behaviour again? |
@Sharparam where on SemVer.org is it recommended to interpret |
I suppose it doesn't outright recommend either way. But given that the first 0 is static during the initial development, no change should be made to it. And yeah, having "breaking" and "major" do different things would be confusing. But I don't see how it would make sense to have the tool inadvertently create a 1.0.0 version when you wouldn't expect it to (I certainly didn't when committing a breaking change during the 0.x phase). The 1.0.0 version should be a very conscious decision (explicitly making the tag). With the current behaviour, projects using GitVersion would always go directly from 0.0.x or 0.x.0 to 1.0.0, unless you explicitly don't use the commit message keywords and only use Git tags. Or one can work around it by knowingly using the wrong bump syntax to get it to bump the correct version part (I had to write |
May I ask you what the motivation is behind this behavior? What does it mean to be in an initial development phase? And if you are not already live with a version on production why do you care about breaking changes? Breaking a non-released feature makes no sense in my opinion. What information it gives to you when using breaking instead of minor keyword (especially in the initial development phase)? Anyway it feels like |
Initial development being anything before the 1.0.0 release that can be considered feature-complete and stable. (At least that's how I view it.) As a practical example, I have a Factorio mod that is in 0.x until a planned GUI feature for it has been added, that will be the first proper release with all expected features added. Since users are using this mod in their games, information about breaking changes is still very much useful. (In this case it's not using GitVersion though, but the same principles apply.) As another example: A Factorio modding/API library I have that doesn't have all the features added yet for its actual usecase. But there are other parts of it that can still be used to interact with some APIs which people might find useful, and informing of breaking changes to the library is important. Separating the |
Yes this might be on possibility to keep the logic like it is and create an alternative interpretation just for |
I think |
The same holds true for |
@HHobeck yes. |
@HHobeck honestly I would not change the way the +semver:major, +semver:minor and +semver:patch work for 0.x versions specifically. I think we need to remove this exception from the docs, as the code is already behaving the same way for 0.x and other versions. I would keep it consistent. As for the breaking part, I would not introduce a specific case for 0.x. I think if the user wants to have the mentioned behavior during the initial development phase, he better updates the |
@arturcic This issue should not be closed as "completed" as the change went in a different direction from what was proposed (sadly). Additionally, I would suggest adding a warning to the docs that bumping via "breaking" in a commit message during 0.x phase will in fact bump the major version, as this will not be expected by some people. And add a note on the proposed workaround of changing the |
@Sharparam to be honest I would rather move the suggestion to a discussion, or even convert this issue into a discussion as it's a special case. I'd keep the documentation as close as possible to the defaults and the special cases should go into discussions.
That's exactly why I'm suggesting to convert into a discussion, as the majority will expect to have same behavior in both cases, for those with a different expectation we have discussions. I think discussions serves better this type of "special" cases, agree? |
Prerequisites
GitVersion package
GitVersion.Tool
GitVersion version
6.0.2+Branch.main.Sha.30211316bc16e481dc440baae39ff904c4fa4966
Operating system
Linux, Windows
What are you seeing?
When bumping the major version (via
+semver:breaking
in the commit message) during "initial development" phase (0.x.y), GitVersion bumps the normal major component (which is 0 during initial development) to 1 instead of the minor component.What is expected?
GitVersion should bump the minor version instead during initial development in 0.x versions.
As described in the documentation:
(Emphasis mine)
Steps to Reproduce
Commands to show the issue:
RepositoryFixture Test
New test can be found in PR #4185.
Output log or link to your CI build (if appropriate).
The text was updated successfully, but these errors were encountered: