-
Notifications
You must be signed in to change notification settings - Fork 652
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
GitVersion fails on AppVeyor when building a pull request (or any detached HEAD) #1666
Comments
This also seems to be a problem when builds are being queued on AppVeyor. If newer commits have been pushed to the branch, then gitversion will fail. |
I have a similar issue, which I believe shares the cause. I have commits meant for a branch (similar to a PR in that sense) which have different refs (refs/changes/[2-digits]/[5-digits]/[1+digit]). So if those commits are meant for develop, the build server (Jenkins) will checkout a branch develop at the specified ref. During repo normalization it will however update the local develop to remote develop, which is of course a different commit and gives the error above. In my case the pointer for this issue was the message Actually, when GitVersion doesn't detect a buildserver and doesn't attempt to do normalization it will output the correct version as well. |
I'm hitting this in Jenkins, but no newer commits have been pushed to remote. |
I'm crossing my fingers that this is fixed in the next version as GitTools.Core is being removed (see #1581). This issue might be interesting too: GitTools/GitTools.Core#49 |
When creating a pull request in GitHub, a new build is started on AppVeyor.
It is checked out as follows:
This causes GitVersion to report an error due to "GitTools.Git.BugException: GitTools.Core has a bug, your HEAD has moved after repo normalisation."
Does this mean that I have to disable building of pull requests, could I have done something else that causes this problem, or is it actually a bug?
Here's the output of
git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes="*" -n 100
:The text was updated successfully, but these errors were encountered: