-
Notifications
You must be signed in to change notification settings - Fork 663
Closed
Labels
Description
Description
I am unable to use Gitversion as part of my build to version my application.
What are the recommendation to use gitversion as part of AppVeyor build to version .NET application?
Steps
At the beginning of the build, AppVeyor clones the repository and checkouts out the commit meant to be built:
git clone -q --branch=[my branch] https://[my repo].git C:\projects\[...]
git checkout -qf [commit to build]
But when Gitversion runs I see the following error:
INFO [09/17/18 9:35:55:42] Running against branch: (no branch) ([commit to build])
WARN [09/17/18 9:35:55:42] An error occurred:
It looks like the branch being examined is a detached Head pointing to commit '[commit]'. Without a proper branch name GitVersion cannot determine the build version.
I tried then using dynamic repository but it wouldn't checkout the branch on the right commit, for example:
gitversion /url [url] /b test-gitversion /c 68264bd15c7364c3f3e53c764260776d4706d288
---
* 317aab8 (origin/test-gitversion, test-gitversion) removed another comment
* 68264bd (HEAD) removed comment
* 1570202 (tag: 1.15.5-alpha.1) Try to resolve first variable from local repository before trying dynamic.
* f77f974 (origin/master, origin/HEAD, master) removed more
It would checkout test-branch on the same level as master branch f77f974 and not 68264bd.