-
Notifications
You must be signed in to change notification settings - Fork 654
[Bug]Failed to try and guess branch to use. Move one of the branches along a commit to remove warning #2927
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
Comments
GitVersion's requirements state:
|
I know the requirements. But it isn't always fail when in detached HEAD. In some detached condition, GitVersion will help switch to the right branch. It switches to main branch (if the main branch's HEAD equals the commit) or proper branch (if found only one branch which name without separator). If I don't build on a Jenkins agent, git version will run success. So I think It is an accidental bug. It often interrupts our CI workflow. In my situation, The commit is tagged, I think the semanticVersion is definite. |
I don't use Jenkins myself and have no use for building detached HEADs, but if you figure out a way to solve this (with tests), I'd be happy to merge a PR. |
🎉 This issue has been resolved in version 5.8.2 🎉 Your GitReleaseManager bot 📦🚀 |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
when build a tag commit on a jenkins agent, it failed and report
"[2021-11-29 16:47:39] WARN [11/29/21 16:47:39:51] An error occurred:
[2021-11-29 16:47:39] Failed to try and guess branch to use. Move one of the branches along a commit to remove warning"
Expected Behavior
build success
Actual Behavior
build failed
Possible Fix
if current commit tagged, not throw a excpetion.
GitVersion/src/GitVersion.Core/Core/GitPreparer.cs
Line 250 in b6d803b
Steps to Reproduce
Context
CI failed after tag
Your Environment
The text was updated successfully, but these errors were encountered: