Skip to content

Sudden jump in version with 4.0.0-beta0014 #1468

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
kierenj opened this issue Sep 5, 2018 · 13 comments
Closed

Sudden jump in version with 4.0.0-beta0014 #1468

kierenj opened this issue Sep 5, 2018 · 13 comments

Comments

@kierenj
Copy link

kierenj commented Sep 5, 2018

Hi - my config:

https://gist.github.com/kierenj/ccc4a3db7775f97554ef2c11543bca72

I have a freshly-created branch, release/1.0.19. GitVersion awards it 1.1.0-rc.1+777.1 - whereas every time previously we've created a release branch (up to and including release/1.0.18), it's correctly done something like 1.0.18-rc.1+333.1.

We're not using semver commit messages, and there aren't any tags.

What can I do to diagnose/does this make any sense?

@dazinator
Copy link
Member

You could try running gitversion.exe with the /diag switch - that should output some more details about the graph which you could paste in a gist, it might help us reason about how its calculating this version.

@kierenj
Copy link
Author

kierenj commented Sep 7, 2018

Ah - it seems it comes down to:

INFO [09/07/18 9:02:17:28] Base version used: Merge message 'Merge branch 'build/pin-net-sdk-to-1.1' into develop': 1.1.0 with commit count source 18130611e3339eb41ddd62cc3005b55b98b511f2 (Incremented: None)

We did indeed merge a branch called build/pin-net-sdk-to-1.1 that - but given my config, I'm not sure why this would count?

@dazinator
Copy link
Member

I'm not that familiar with the config myself yet. I don't usually have to delve into it :-)
Does changing this line make a difference: https://gist.github.com/kierenj/ccc4a3db7775f97554ef2c11543bca72#file-gitversion-yml-L12

@kierenj
Copy link
Author

kierenj commented Sep 13, 2018

I'm not sure - but I'd like to keep that if possible. We do use it occassionally?

@dazinator
Copy link
Member

@kierenj I think GitVersion has the ability to ignore certain SHA's that you think are interfering with version calculation. You could try that - should be mentioned in the docs, you add the SHA's to the config somewhere.

@kierenj
Copy link
Author

kierenj commented Sep 25, 2018

:'( this still feels like a bug, anything we can do here?

@tgharold
Copy link

We're getting bit by this bug as well. We run a forked workflow in Github and one of the developers named their branch 'upgrade-to-package-xyz-4.3.0' which has now confused GitVersion beta 14, while beta 12 would ignore that branch name.

@konne
Copy link

konne commented Oct 12, 2018

@kierenj I have the same issue. We use dependabot and now I get strange version numbers.
So the new version of gitversiontask use this for example this number:
Merge message 'Merge pull request #11 from q2g/dependabot/nuget/src/development/NLog-4.5.10

@dazinator this doesn't help: commit-message-incrementing: Disabled
to add for each PR from dependabot and ignore SHA is not an solution
I think we need a possibilibity to exlude Version numbers from PR complete or do define an exclude regex

@jbaehr
Copy link
Contributor

jbaehr commented Feb 18, 2019

@asbjornu: is this issue also fixed by #1541?

@asbjornu
Copy link
Member

@jbaehr: #1541 ignores branch names of non-release branches, not commit messages. However, it will perhaps also affect commit messages made in ignored branches... I haven't tested. Regarding ignoring commit-messages, #1507 tries to tackle that problem.

@jbaehr
Copy link
Contributor

jbaehr commented Feb 18, 2019

@asbjornu I think this issue is also about branch names. But not about a name of an existing branch, but a branch name reconstructed from a merge commit message:

From #1468 (comment)

INFO [09/07/18 9:02:17:28] Base version used: Merge message 'Merge branch 'build/pin-net-sdk-to-1.1' into develop': 1.1.0 with commit count source 18130611e3339eb41ddd62cc3005b55b98b511f2 (Incremented: None)

i.e. the faulty "1.1" does not result from a currently existing branch build/pin-net-sdk-to-1.1, but a previously existing, merged and removed, one.

@asbjornu
Copy link
Member

@jbaehr, thanks for the clarification. Then I definitely think #1507 is going to be a possible fix.

@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

Successfully merging a pull request may close this issue.

7 participants