Forced push breaks GitVersion under TeamCity #4053
-
Prerequisites
GitVersion packageGitVersion.MsBuild GitVersion version5.12.0 Operating systemWindows What are you seeing?I have the requirement to build an old clone of NHibernate.Search under TeamCity with msbuild, but GitVersion bails out with (log sanitized):
And that's because that commit no longer exists, being lost with the Forced Push here:
I should mention that the command above succeeds if not run under TeamCity, e.g. indirectly from Visual Studio or at a command prompt, probably because it identifies the branch by path, and not insisting on finding that exact commit. Is there a workaround, say to make GitVersion operate the same way under TeamCity? What is expected?GitVersion should fallback to identifying the brach by path. Steps to ReproduceAlready described. RepositoryFixture TestNo response Output log or link to your CI build (if appropriate).No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The trick is to prevent git fetch, by adding the following to Directory.Build.props: |
Beta Was this translation helpful? Give feedback.
The trick is to prevent git fetch, by adding the following to Directory.Build.props:
<GitVersion_NoFetchEnabled>true</GitVersion_NoFetchEnabled>