Description
Describe the bug
When a TeamCity build configuration's VCS Root uses the option "Use tags as branches" a compile time exception is thrown:
Git2SemVerGitOperationException: Unable to read branch name from Git status response '## HEAD (no branch)
Build fails.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
Build succeeds.
Version (please complete the following information):
- Git2SemVer.MSBuild version: 1.1.0
Environment (please complete the following information):
- Local TeamCity
Additional context
TeamCity build: 509 (local)
From Git2SemVer.Build.log:
TRACE|Running '/usr/bin/git status -b -s --porcelain'.
ERROR|Exception - Unable to read branch name from Git status response '## HEAD (no branch)
?? teamcity.logger.9e11092f10844b3998fa0406f2292a9b/
'.Stack trace: at NoeticTools.Common.Tools.Git.GitTool.ParseStatusResponseBranchName(String stdOutput)
at NoeticTools.Common.Tools.Git.GitTool.GetBranchName()
at NoeticTools.Common.Tools.Git.GitTool..ctor(ILogger logger)
at NoeticTools.Git2SemVer.MSBuild.Versioning.ProjectVersioningFactory.Create(IVersionGeneratorInputs inputs)
at NoeticTools.Git2SemVer.MSBuild.Tasks.Git2SemVerGenerateVersionTask.Execute()