Replies: 1 comment
-
I decided to fix this for now by checking out the current branch and ensuring that the branch commit matches the pipeline commit id. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using Azure Pipelines with DevOps where merge from dev to main is done via Rebase Fast Forward. I have a following GitVersion.yml:
Expected behavior:
Actual behavior:
Reasoning why this happens is not that complicated. Azure DevOps checkouts the branch in detached head commit, which now exists in both dev and main. I assume that GitVersion is not sure in which branch this commit exists, so it will add the
-no-branch-
branch tag.Question is: What would be the best way to solve this? Currently I have just a dummy way where I use different variable to generate a new tag
SemVer
vsMajorMinorPatch
based on the branch within the pipeline itself. I was wondering if there were something in the config that I should do to achieve the result I want.Another option would be to change the git checkout to the branch itself, away from the detached head commit, but it might cause some other side effects. I am leaving it on the table for now.
Beta Was this translation helpful? Give feedback.
All reactions