Skip to content

GitVersion beta-0014 giving strangely high version numbers #1463

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

Closed
david-driscoll opened this issue Aug 28, 2018 · 3 comments
Closed

GitVersion beta-0014 giving strangely high version numbers #1463

david-driscoll opened this issue Aug 28, 2018 · 3 comments

Comments

@david-driscoll
Copy link
Contributor

Hey Guys ❤️ GitVersion because it's awesome.

We ran into an issue with GitVersion giving us a crazy version number (plus crazy number of past commits).

Repro steps:

  1. Clone https://github.com/OmniSharp/omnisharp-roslyn
  2. Unpin GitVersion (it's in common.cake)
  3. Build, you don't have to run the full build, just build so that cake restores the nuget packages.

running GitVersion from command line will give you a number like:
3.5.0-beta.1878+Branch.master.Sha.9e76cbf2ae1f0407209503e2353f8945ef999a0d

gitversion /diag gives me:


Update xUnit to 2.4.0 release': 2.4.0 with commit count source 057c77dcbaffabac3c718fedbf151bff002440c2 (Incremented: None)
  INFO [08/28/18 15:03:52:45] Merge message 'Merge pull request #1237 from OmniSharp/update/extensions-2.1.0

Upgrade dependencies': 2.1.0 with commit count source 49ba7fdb573fcf5f0d26e242267ec97c31176519 (Incremented: None)
  INFO [08/28/18 15:03:52:47] Merge message 'Merge pull request #1132 from filipw/feature/roslyn-2.7.0

updated to Roslyn 2.7.0': 2.7.0 with commit count source 2757c23cab04f3aa8fca810954c9b044d8b3bb5a (Incremented: None)
  INFO [08/28/18 15:03:52:48] Merge message 'Merge pull request #1055 from filipw/feature/roslyn-2.6.0

Roslyn 2.6.0 + C# 7.2': 2.6.0 with commit count source f2248467e93b482d39c60b534e74a3dd7796b3e2 (Incremented: None)
  INFO [08/28/18 15:03:52:51] Merge message 'Merge pull request #1057 from mholo65/feature/cake-scripting-0.2.x

Update Cake.Scripting dependencies to 0.2.0': 0.2.0 with commit count source 1dfe65869822dbfa8e23aa22a1e4889c969b223a (Incremented: None)
  INFO [08/28/18 15:03:52:53] Merge message 'Merge pull request #1018 from DustinCampbell/port-1.26.2-fixes

Port fixes for 1.26.2': 1.26.2 with commit count source c289587318d1997c3264ee28227479b1e89d3903 (Incremented: None)
  INFO [08/28/18 15:03:52:55] Merge message 'Merge pull request #998 from filipw/feature/roslyn-2.4.0

Updated to Roslyn 2.4.0': 2.4.0 with commit count source d1a145118779213e4733da18ff4ec1d199d807e8 (Incremented: None)
  INFO [08/28/18 15:03:52:56] Merge message 'Merge pull request #699 from DustinCampbell/update-nuget-to-3.5.0

Update build tools': 3.5.0 with commit count source 793228fa65a9af2651c17cb6b27502411e128a6e (Incremented: None)
  INFO [08/28/18 15:03:52:56] Source was ignored due to commit date being outside of configured range
  INFO [08/28/18 15:03:52:56] Merge message 'Merge pull request #654 from DustinCampbell/roslyn-2.0.0-beta5

Update to Roslyn 2.0.0-beta5': 2.0.0 with commit count source 801dae11a8c6f45b23254d0623b9505f894eca91 (Incremented: None)
  INFO [08/28/18 15:03:52:56] Source was ignored due to commit date being outside of configured range
  INFO [08/28/18 15:03:52:57] Found multiple base versions which will produce the same SemVer (2.7.0), taking oldest source for commit counting (Merge message 'Merge pull request #1132 from filipw/feature/roslyn-2.7.0

updated to Roslyn 2.7.0')
  INFO [08/28/18 15:03:52:57] Base version used: Merge message 'Merge pull request #1132 from filipw/feature/roslyn-2.7.0

updated to Roslyn 2.7.0': 2.7.0 with commit count source 2757c23cab04f3aa8fca810954c9b044d8b3bb5a (Incremented: None)

The commit in question that it's picking a version up from is merge commit I think. Is there a way to exclude merge commits from version calculations? Or am I just stuck ignore sha's once a while (which I guess is okayish).

@konne
Copy link

konne commented Oct 7, 2018

Hi, I think this come from: Merge pull request #699 from DustinCampbell/update-nuget-to-3.5.0
because I now use nice PR for Nuget updates.
In older GitVersions I could fix it with the config, but now this is not working anymore. I added this issue #1481

@konne
Copy link

konne commented Oct 12, 2018

Sorry, my issue was wrong the right should be #1468
@david-driscoll please close this issue if you think the same so that we can follow this in this issue

@asbjornu
Copy link
Member

Since #1507 was closed as per #1507 (comment), I'm closing this as well. Please submit a new PR fixing this problem if it still exists.

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

No branches or pull requests

3 participants