Add git-based detection of tags at HEAD to improve PublicRelease detection by georg-jung · Pull Request #876 · dotnet/Nerdbank.GitVersioning (original) (raw)
added 4 commits
- Managed git does not support annotated tags yet
- json output reads: "NBGV_BuildingTags": "System.Collections.Generic.List`1[System.String]",
AArnott changed the title
Add git-based detection of tags at HEAD to improve RublicRelease detection, fix #873 Add git-based detection of tags at HEAD to improve PublicRelease detection, fix #873
Throwing was intentional to match HeadCanonicalName behaviour. Throwing fails the tests though. Maybe this is because the tests run in a cloud build environment and HeadCanonicalName isn't used there?
this.BuildingRef = cloudBuild?.BuildingTag ?? cloudBuild?.BuildingBranch ?? context.HeadCanonicalName;
This would mean that the tests would currently fail when executed locally.
Return null if no HEAD could be determined, return an empty collection if there are no matching tags.
Without this fix we might have considered one level of transitive annotated tags, if a peel line is present in packed-refs. With this fix we also avoid reading the git pack of annotated tags that have peel lines and do not match the object id we are looking for.
This was referenced
Jan 16, 2026
This was referenced
Jan 23, 2026
This was referenced
Feb 3, 2026
This was referenced
Mar 10, 2026
This was referenced
Apr 13, 2026
This was referenced
Apr 21, 2026
This was referenced
May 2, 2026
craigktreasure pushed a commit to craigktreasure/Treasure.Utils that referenced this pull request
This was referenced
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})