-
Notifications
You must be signed in to change notification settings - Fork 640
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
HighestTagBaseVersionStrategy critical bug #389
Comments
btw. I use sourcetree for following gitflow, so it's something that affects all sourcetree users if this is by design. |
v3 is practically a rewrite which is why I have been asking for more people to test. I am not really clear of the issue, could you elaborate with the version you are getting and what you expect? |
The previous version gave me 2.6.0-unstable-001 or something like that. Now it says 1.9.0-unstable-73. |
Another thing is that it now defaults to 0.1.0 instead of 0.2.0, but that can be bypassed by using the config. |
Yeah, I just cloned and had a look. This is listed as a breaking change, we no longer track the version of master on develop. GitVersion has been made more stupid in that regard. This may be an issue of my understanding of GitFlow, but shouldn't the release branch be merged into develop as well as master? |
Understand.. GitVersion in 3.0 basically only looks at what is in it's history tree. It makes it much easier to follow what it is doing and means we don't have different classes for calculating versions for each branch. I am thinking maybe we just create a Or we make it generic and have a config value on the develop branch saying it tracks masters version. @andreasohlund any other ideas? |
I think that is expected, I think starting at 0.2.0 is wrong? |
Agree, so I won't complain about that ;-) |
I think I found a nice workaround. I added this method:
It checks if the tag is the result of a specific commit (we are currently investigating). This will ensure that we only use tags coming from the branch we are really investigating. It results in the following: What are your thoughts. Am I missing something here? |
What branch are you running on? From what I understand the issue is this: using (var fixture = new EmptyRepositoryFixture())
{
fixture.repo.MakeACommit();
fixture.repo.Branch("develop").Checkout();
fixture.repo.MakeACommit();
fixture.repo.Branch("release/1.0.0").Checkout();
fixture.repo.Checkout("master");
fixture.repo.MergeNoFF("release/1.0.0");
fixture.repo.TagCommit("1.0.0");
fixture.repo.Checkout("develop");
fixture.AssertFullSemVer("1.0.0-unstable.1");
} But that fails as the version on develop has not bumped and is still |
/url https://github.com/Catel/Catel.Fody /b develop /output buildserver |
Yeah. So the issue is, the tags on master are not on develop. So it no longer discovers them. If so, we need to re-implement the logic which tracks tags on master and bumps develop accordingly. I suggest we create a |
No idea, unsure of the context. The fixture is creating an empty git repo via libgit2. |
Well, the extension method I wrote does just that. It checks if the merge is coming from the branch we are investigating (thus develop in this case). The only issue I foresee is that if a merge from develop to another branch would also be tagged. I never did that, but is it something that can happen in GitFlow? |
This fixture now succeeds:
Without my changes, the unit test without any changes in the release branch fails. With the changes it succeeds. |
Cool. Can you throw a PR up? Just jumped off the train and will be busy until I head back to London tomorrow. Will sort it out then. Sent from my Windows Phone From: Geert van Horrikmailto:notifications@github.com This fixture now succeeds: [Test]
} — |
Will try. Need to make sure I didn't break anything else. |
Safest is a new base version finder hardcoded to develop. Or an opt in config value which turns on that logic (can just enable for develop). Config approach is probably better then can opt any branch into that logic. Sent from my Windows Phone From: Geert van Horrikmailto:notifications@github.com Will try. Need to make sure I didn't break anything else. — |
Fixed by #392 |
I have a repository (Catel.Fody), which has these commits:
Somehow it picks tags on the specific branch, but not sure why it would do that.
The previous versions of GitVersion worked fine.
The text was updated successfully, but these errors were encountered: