-
Notifications
You must be signed in to change notification settings - Fork 654
Fixing tests #355
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
Fixing tests #355
Conversation
@@ -17,7 +17,7 @@ public void ShouldNotUseNumberInFeatureBranchAsPreReleaseNumber() | |||
fixture.Repository.Checkout("feature/JIRA-123"); | |||
fixture.Repository.MakeCommits(5); | |||
|
|||
fixture.AssertFullSemver("1.1.0-JIRA-123+5"); | |||
fixture.AssertFullSemver("1.1.0-JIRA-123.1+5"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this new behaviour is correct. the .1 is the same as we put on -beta, -unstable etc.
Also got tests showing that PR's off develop bump minor but PR's off master bump patch (PR's inherit the incrementing config from the branch they were branched from // @SimonCropp @andreasohlund @gep13 @yannisgu a review of this would be grand. |
fixture.Repository.Reset(ResetMode.Hard, "HEAD~1"); | ||
fixture.Repository.Checkout("pull/2/merge"); | ||
|
||
fixture.DumpGraph(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this only for debug purpose?
Or is it intentional logging? Then it should probably be added to all tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has no side effects but could probably be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed test is wrong. Should be PullRequest.2
Anyone have any issues with the general commit counting changes in this. There is still work to be done on the main branch to get all tests green but don't want to do any more on this. Otherwise I can just merge and continue until I get green then you can take it for a spin and review the final changes? |
The logic of the new commit counting seems sound to me. +1 for proceeding |
Taking a run at fixing a bunch of the failing tests. All of these tests are mainly failing because of commit counting strategies.
I have simplified this a great deal (in my mind). GitVersion now uses this basic rule:
Count commits from the source of the base version
, if a base version doesn't have a source (say NextVersion from Config) it will use the source from the next base version.For example, if the base version comes from a tag then it will be counted from that tag. If it is from a version in a branch name then it will be number of commits since that branch was created. If it comes a merge message it will count from when that merge was done.
The current commit counting confuses me. Would love a decent review of the commit counts in this @andreasohlund @SimonCropp @gep13 @nulltoken if possible :)