GitVersion: [Bug] 5.6.5 Not finding Tag in master repo
My master branch has a Tag 6.1.0. It get correctly picked up by version 5.6.4
INFO [01/28/21 13:53:18:60] Begin: Calculating base versions
INFO [01/28/21 13:53:18:62] Fallback base version: 0.1.0 with commit count source 1f34f7b0477ebdaba3db9de21c9bc4aa1ba432d9
INFO [01/28/21 13:53:18:67] Git tag '6.1.0': 6.1.0 with commit count source ee2c143847ae685ad96dedb7020bf563ac535bea
INFO [01/28/21 13:53:18:72] Found multiple base versions which will produce the same SemVer (6.2.0), taking oldest source for commit counting (Git tag '6.1.0')
INFO [01/28/21 13:53:18:72] Base version used: Git tag '6.1.0': 6.1.0 with commit count source ee2c143847ae685ad96dedb7020bf563ac535bea
INFO [01/28/21 13:53:18:72] End: Calculating base versions (Took: 117.57ms)
but in version 5.6.5 it is not found:
INFO [02/09/21 7:24:04:69] Begin: Calculating base versions
INFO [02/09/21 7:24:04:71] Fallback base version: 0.1.0 with commit count source 1f34f7b0477ebdaba3db9de21c9bc4aa1ba432d9
INFO [02/09/21 7:24:04:80] Found multiple base versions which will produce the same SemVer (0.2.0), taking oldest source for commit counting (Fallback base version)
INFO [02/09/21 7:24:04:80] Base version used: Fallback base version: 0.1.0 with commit count source 1f34f7b0477ebdaba3db9de21c9bc4aa1ba432d9
INFO [02/09/21 7:24:04:80] End: Calculating base versions (Took: 118.04ms)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 45 (23 by maintainers)
Commits related to this issue
- Fall back to `master` if `main` is missing Fall back to `master` if `main` is missing. Fixes GH-2590. — committed to asbjornu/GitVersion by asbjornu 2 years ago
- Fall back to `master` if `main` is missing Fall back to `master` if `main` is missing. Fixes GH-2590. — committed to asbjornu/GitVersion by asbjornu 2 years ago
- Fall back to `master` if `main` is missing Fall back to `master` if `main` is missing. Fixes GH-2590. — committed to asbjornu/GitVersion by asbjornu 2 years ago
- Merge pull request #3037 from asbjornu/feature/gh-2590 Fall back to `master` if `main` is missing — committed to GitTools/GitVersion by asbjornu 2 years ago
Already published versions of the GitTools task should continue to work, @superjulius. If they are removed, that’s beyond our control and up to Microsoft, if anything. There is no plan to fix this beyond us accepting a pull request that fixes it. As none of the maintainers seem to have this issue, we have no incentive to work on it, unfortunately.
We are looking to replace the deprecated GitVersion with the latest GitTools task in Azure Pipelines but we also hit the versioning issue as our repo is using master naming
@asbjornu @arturcic Is it safe to explicitly target 5.6.4 (no risk of depreciation)? Is there any plan to fix this in 5.x? or more likely to be addressed in 6.x?
Took a quick look at the code and found the following. Updating line 53 from TrackReleaseBranchesVersionStrategy.cs (MainTagsVersions method) from
to
solves the issue. Now, I’m not familiar with the codebase at all and have no idea of any side effects, but it keeps all existing tests passing.
Any advice on this? @asbjornu @arturcic
This issues has forced us to leave gitversion on 5.6.4 for all of our projects that utilise it. I can only assume that it doesn’t impact everyone, or it would have been given a higher priority. Does anyone know what the root cause is?
@Lukkian thanks for the update. I will check what missing piece was not updated. Please do not change the remote