GitTools / GitVersion

From git log to SemVer in no time
https://gitversion.net/docs/
MIT License
2.85k stars 649 forks source link

[Bug] GitVersion.MsBuild 5.6.4 fails building a PR on AppVeyor #2554

Closed ermshiperete closed 1 year ago

ermshiperete commented 3 years ago

Version 5.6.4 of GitVersion.MsBuild fails building a pull request in the normalization step:

    ...
    INFO [01/20/21 18:40:40:40] End: Normalizing git directory for branch 'feature/nuget' (Took: 909.75ms)
    ERROR [01/20/21 18:40:40:41] An unexpected error occurred:
  GitVersion.BugException: GitVersion has a bug, your HEAD has moved after repo normalisation.

  To disable this error set an environmental variable called IGNORE_NORMALISATION_GIT_HEAD_MOVE to 1

  Please run `git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=* -n 100` and submit it along with your build log (with personal info removed) in a new issue at https://github.com/GitTools/GitVersion
     at GitVersion.GitPreparer.NormalizeGitDirectory(String gitDirectory, Boolean noFetch, String currentBranchName, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitPreparer.cs:line 265
     at GitVersion.GitPreparer.NormalizeGitDirectory(String targetBranch, String gitDirectory, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitPreparer.cs:line 130
     at GitVersion.GitPreparer.PrepareInternal(Boolean normalizeGitDirectory, String currentBranch, Boolean shouldCleanUpRemotes) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitPreparer.cs:line 77
     at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitVersionCalculateTool.cs:line 45
     at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersionExe\GitVersionExecutor.cs:line 61
    INFO [01/20/21 18:40:40:41] Attempting to show the current git graph (please include in issue): 
    INFO [01/20/21 18:40:40:41] Showing max of 100 commits
    INFO [01/20/21 18:40:40:53] * b86c3e16 2 hours ago  (HEAD -> feature/nuget, origin/feature/nuget)
  * aada26c0 4 hours ago 
  * 15516f0e 8 hours ago 
  * 61f08a44 13 days ago 
  * 93db6728 2 weeks ago 
  * 2613a4d5 2 weeks ago 
  * 372a59c0 2 weeks ago 
  * 55ffc462 2 weeks ago 
  *   94208132 4 weeks ago 
  |\  
  | * a1e42a90 4 weeks ago 
  |/  
  *   8b94bcab 5 weeks ago 
  |\  
  | * e73fa01b 5 weeks ago 
  |/| 
  | *   d2d16493 6 weeks ago  (origin/master, origin/HEAD, master)
  | |\  
  | | * 6bc428b9 6 weeks ago 
  | |/  
  * | 7d13027a 5 weeks ago 
  * | 038ff602 6 weeks ago 
  * |   923c353c 6 weeks ago 
  |\ \  
  | * | 511d131d 6 weeks ago 
  |/ /  
  * |   ae922d71 6 weeks ago 
  |\ \  
  | * | 7cd25bba 6 weeks ago 
  | * | 120224a2 6 weeks ago 
  * | |   14656eca 6 weeks ago 
  |\ \ \  
  | |/ /  
  |/| |   
  | * | 4c47846c 6 weeks ago 
  | |\| 
  | | *   3ac6dc24 6 weeks ago 
  | | |\  
  | | | *   f2e34eeb 8 weeks ago 
  | | | |\  
  | | | |/  
  | | |/|   
  | | | * a492fe36 9 weeks ago 
  | * | |   73694cf2 6 weeks ago 
  | |\ \ \  
  | |/ / /  
  |/| | |   
  * | | |   d817778c 6 weeks ago 
  |\ \ \ \  
  | * | | | 696e86a5 6 weeks ago 
  |/ / / /  
  | * / / 37446413 7 weeks ago 
  |/ / /  
  * | |   e3e3dc21 7 weeks ago 
  |\ \ \  
  | * | | 2c21701b 7 weeks ago 
  |/| | | 
  | |/ /  
  | * | 4fbc09f5 8 weeks ago 
  | * | dc224d0f 9 weeks ago 
  | |/  
  | * e00b2dce 2 months ago 
  * | 2cab71e0 7 weeks ago 
  * | 42789d5a 8 weeks ago 
  * | 585c1740 10 weeks ago 
  * | 8ea4f0ae 2 months ago 
  * | df81d8af 2 months ago 
  * | 6b8c2039 2 months ago 
  * | 7125e571 2 months ago 
  * | 795ee2a1 2 months ago 
  * | b37eb5dd 2 months ago 
  |\| 
  | * eb2e4f39 3 months ago 
  | * 06972c34 3 months ago 
  | * 189ac671 3 months ago 
  | * 9afb5bb8 3 months ago 
  | *   39b4a0f4 3 months ago 
  | |\  
  | | *   399c840f 3 months ago 
  | | |\  
  | | |/  
  | |/|   
  | * |   589f67cb 3 months ago 
  | |\ \  
  | | * \   43420280 3 months ago 
  | | |\ \  
  | | |/ /  
  | |/| |   
  | * | |   c5bd6a5e 3 months ago 
  | |\ \ \  
  | | * | | 33afc7d5 3 months ago 
  | |/ / /  
  | | * | f17b9265 3 months ago 
  | | | * d78932be 3 months ago 
  | | |/  
  | |/|   
  | * | 2179aac4 4 months ago 
  | |/  
  | * dab113ec 4 months ago 
  | * 42cfb0f3 4 months ago 
  | * 08519da4 4 months ago 
  | * 27ada7b2 5 months ago 
  | * 177be2d5 5 months ago 
  | * 6dbb52f8 5 months ago 
  | * a83c32ea 5 months ago 
  | * 875925c4 5 months ago 
  | * 00384943 6 months ago 
  | *   265a9703 6 months ago 
  | |\  
  | | * 5be3e22e 6 months ago 
  | |/  
  | * 6488141a 6 months ago 
  | * b9efdf6a 6 months ago 
  * | ee85f45b 3 months ago 
  * | f9a4835d 3 months ago 
  * | 07981dd6 3 months ago 
  * | 4c60c499 3 months ago 
  * | 4b475d5b 3 months ago 
  * |   1e29883e 3 months ago 
  |\ \  
  | * | 1bd58b78 3 months ago 
  |/ /  
  * |   ebfc28a5 3 months ago 
  |\ \  
  | * | 361b7401 3 months ago 
  | * | ed8f6752 3 months ago 
  | * | 0d5a4978 3 months ago 
  | * | bedc1ee1 3 months ago 
  | * | 9cbbf805 3 months ago 
  | * | 73f8df04 3 months ago 
  | * | 10e197f4 3 months ago 
  * | | 516f6646 3 months ago 
  |/ /  
  | | * 58b05733 3 months ago  (origin/previous-unit-test-omission, previous-unit-test-omission)
  | |/  
  |/|   
  * | 75b3befb 3 months ago 
  * |   60068db7 4 months ago 
  |\ \  
  | * | 470150cb 4 months ago 
  | * | 4feb6ea2 4 months ago 
  | * | 35494db9 4 months ago 
  | * | e663fcc9 4 months ago 
  | * | 0940ee1d 4 months ago 
  |/ /  
  * | 37a38756 6 months ago 
  * | 800e19b6 6 months ago 
  * | 9d1aae80 6 months ago 
  * | 4bf83b0c 6 months ago 
  * | 3aa1ce28 7 months ago 
  * | 921dc087 7 months ago 

Running git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=* -n 100 gives:

git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=* -n 100
*   7213b4de 21 minutes ago  (HEAD)
|\  
| * 696a3bc3 23 minutes ago 
|/  
* b86c3e16 2 hours ago  (origin/feature/nuget)
* aada26c0 4 hours ago 
* 15516f0e 8 hours ago 
* 61f08a44 13 days ago 
* 93db6728 2 weeks ago 
* 2613a4d5 2 weeks ago 
* 372a59c0 2 weeks ago 
* 55ffc462 2 weeks ago 
*   94208132 4 weeks ago 
|\  
| * a1e42a90 4 weeks ago 
|/  
*   8b94bcab 5 weeks ago 
|\  
| * e73fa01b 5 weeks ago 
|/| 
| *   d2d16493 6 weeks ago  (origin/master, origin/HEAD, master)
| |\  
| | * 6bc428b9 6 weeks ago 
| |/  
* | 7d13027a 5 weeks ago 
* | 038ff602 6 weeks ago 
* |   923c353c 6 weeks ago 
|\ \  
| * | 511d131d 6 weeks ago 
|/ /  
* |   ae922d71 6 weeks ago 
|\ \  
| * | 7cd25bba 6 weeks ago 
| * | 120224a2 6 weeks ago 
* | |   14656eca 6 weeks ago 
|\ \ \  
| |/ /  
|/| |   
| * | 4c47846c 6 weeks ago 
| |\| 
| | *   3ac6dc24 6 weeks ago 
| | |\  
| | | *   f2e34eeb 8 weeks ago 
| | | |\  
| | | |/  
| | |/|   
| | | * a492fe36 9 weeks ago 
| * | |   73694cf2 6 weeks ago 
| |\ \ \  
| |/ / /  
|/| | |   
* | | |   d817778c 6 weeks ago 
|\ \ \ \  
| * | | | 696e86a5 6 weeks ago 
|/ / / /  
| * / / 37446413 7 weeks ago 
|/ / /  
* | |   e3e3dc21 7 weeks ago 
|\ \ \  
| * | | 2c21701b 7 weeks ago 
|/| | | 
| |/ /  
| * | 4fbc09f5 8 weeks ago 
| * | dc224d0f 9 weeks ago 
| |/  
| * e00b2dce 2 months ago 
* | 2cab71e0 7 weeks ago 
* | 42789d5a 8 weeks ago 
* | 585c1740 10 weeks ago 
* | 8ea4f0ae 2 months ago 
* | df81d8af 2 months ago 
* | 6b8c2039 2 months ago 
* | 7125e571 2 months ago 
* | 795ee2a1 2 months ago 
* | b37eb5dd 2 months ago 
|\| 
| * eb2e4f39 3 months ago 
| * 06972c34 3 months ago 
| * 189ac671 3 months ago 
| * 9afb5bb8 3 months ago 
| *   39b4a0f4 3 months ago 
| |\  
| | *   399c840f 3 months ago 
| | |\  
| | |/  
| |/|   
| * |   589f67cb 3 months ago 
| |\ \  
| | * \   43420280 3 months ago 
| | |\ \  
| | |/ /  
| |/| |   
| * | |   c5bd6a5e 3 months ago 
| |\ \ \  
| | * | | 33afc7d5 3 months ago 
| |/ / /  
| | * | f17b9265 3 months ago 
| | | * d78932be 3 months ago 
| | |/  
| |/|   
| * | 2179aac4 4 months ago 
| |/  
| * dab113ec 4 months ago 
| * 42cfb0f3 4 months ago 
| * 08519da4 4 months ago 
| * 27ada7b2 5 months ago 
| * 177be2d5 5 months ago 
| * 6dbb52f8 5 months ago 
| * a83c32ea 5 months ago 
| * 875925c4 5 months ago 
| * 00384943 6 months ago 
| *   265a9703 6 months ago 
| |\  
| | * 5be3e22e 6 months ago 
| |/  
| * 6488141a 6 months ago 
| * b9efdf6a 6 months ago 
* | ee85f45b 3 months ago 
* | f9a4835d 3 months ago 
* | 07981dd6 3 months ago 
* | 4c60c499 3 months ago 
* | 4b475d5b 3 months ago 
* |   1e29883e 3 months ago 
|\ \  
| * | 1bd58b78 3 months ago 
|/ /  
* |   ebfc28a5 3 months ago 
|\ \  
| * | 361b7401 3 months ago 
| * | ed8f6752 3 months ago 
| * | 0d5a4978 3 months ago 
| * | bedc1ee1 3 months ago 
| * | 9cbbf805 3 months ago 
| * | 73f8df04 3 months ago 
| * | 10e197f4 3 months ago 
* | | 516f6646 3 months ago 
|/ /  
| | * 58b05733 3 months ago  (origin/previous-unit-test-omission)
| |/  
|/|   
* | 75b3befb 3 months ago 
* |   60068db7 4 months ago 
|\ \  
| * | 470150cb 4 months ago 
| * | 4feb6ea2 4 months ago 
| * | 35494db9 4 months ago 
| * | e663fcc9 4 months ago 
| * | 0940ee1d 4 months ago 
|/ /  
* | 37a38756 6 months ago 
* | 800e19b6 6 months ago 
* | 9d1aae80 6 months ago 
* | 4bf83b0c 6 months ago 

Expected Behavior

GitVersion calculates version number even for detached heads (as previous versions of GitVersionTask did).

Your Environment

bert2 commented 3 years ago

I'm seeing the same issue in my AppVeyor builds where I use GitVersion.CommandLine in cake scripts. Pinning the version to 5.6.3 fixes the issue.

I'd like to try it with the latest beta version but 5.6.5-beta1.17 was not published to NuGet.

Sharparam commented 3 years ago

We're seeing this issue as well on a PR for a release branch into master, using GitVersion 5.6.6.

Output from the git log command: https://gist.github.com/Sharparam/5601f49dc834a9e5371898b869c5a75d

AppVeyor build log: https://ci.appveyor.com/project/chroma-sdk/colore/builds/38005297

Edit: Can confirm that downgrading to 5.6.3 makes GitVersion work again.

asbjornu commented 3 years ago

@Sharparam, are you able to reproduce that locally as well in the same repository?

Sharparam commented 3 years ago

If I run GitVersion on the same commit locally (with a temporary release branch created on that same commit) it works fine, but I'm not sure how similar the local environment is to the pull request being built on AppVeyor. The same commit being built on AppVeyor before the PR build also worked fine, so it seems to be something specific to when the commit is built as part of a PR, but I'm not sure how to replicate that environment.

Compare:

asbjornu commented 3 years ago

What happens if you define the environment variable APPVEYOR before executing GitVersion, @Sharparam?

https://github.com/GitTools/GitVersion/blob/eba8d12748c7dbd8b18937764445235c545858bb/src/GitVersion.Core/BuildAgents/AppVeyor.cs#L16

Sharparam commented 3 years ago

@asbjornu That generates a different error about a URI being null.

If I clone locally, check out the same commit as the one in the failed AppVeyor build, and fabricate a release/6.0.0 branch on it I get this output when building and GitVersion being called:

$ $env:APPVEYOR = "1"
$ dotnet cake --target=Clean # "Clean" being the build step that does the least work just to test GitVersion
The assembly 'Cake.DocFx, Version=0.13.1.0, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (0.33.0).
For best compatibility it should target Cake.Core version 1.0.0.
E:/Users/adamh/Projects/CSharp/colore_gitversion_debug/build.cake(203,13): warning CS0618: 'DotNetCoreTestSettings.Logger' is obsolete: 'Please use Loggers instead.'
E:/Users/adamh/Projects/CSharp/colore_gitversion_debug/build.cake(207,13): warning CS0618: 'DotNetCoreTestSettings.Logger' is obsolete: 'Please use Loggers instead.'

----------------------------------------
Setup
----------------------------------------
PATH is C:\Program Files\PowerShell\7;E:\Oculus\Support\oculus-runtime;C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;E:\Program Files\ImageMagick-7.0.3-Q16;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;E:\ffmpeg\bin;E:\Program Files (x86)\CMake\bin;E:\MinGW\bin;C:\Users\adamh\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\GtkSharp\2.12\bin;E:\Program Files (x86)\gs\gs9.20\bin;E:\Users\adamh\AppData\Local\Android\sdk\platform-tools;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\doxygen\bin;E:\Program Files (x86)\Graphviz2.38\bin;E:\Program Files (x86)\LINQPad5;E:\youtube-dl;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;E:\PuTTY\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\System32\OpenSSH\;E:\Program Files\CMake\bin;E:\Program Files\LLVM\bin;E:\tools\ninja\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\olm;E:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;E:\Program Files (x86)\GnuPG\bin;E:\bin;E:\Program Files\nodejs\;E:\Program Files (x86)\Yarn\bin\;C:\Program Files (x86)\dotnet\;C:\Program Files\PowerShell\7\;E:\Program Files\Pandoc\;C:\texlive\2020\bin\win32;E:\Program Files\Git\cmd;C:\Users\adamh\scoop\shims;C:\Users\adamh\.cargo\bin;C:\Ruby25-x64\bin;C:\Users\adamh\.dotnet\tools;C:\Users\adamh\AppData\Local\atom\bin;C:\Users\adamh\AppData\Roaming\Python\Python37\Scripts;E:\Program Files (x86)\LilyPond\usr\bin;C:\Program Files (x86)\Atmel\Flip 3.4.7\bin;C:\rakudo\bin;C:\rakudo\share\perl6\site\bin;C:\Users\adamh\AppData\Local\Keybase\;C:\Users\adamh\AppData\Local\Microsoft\WindowsApps;E:\Program Files\Inkscape\bin;C:\Users\adamh\.dotnet\tools;C:\Users\adamh\AppData\Roaming\npm;C:\Users\adamh\AppData\Local\Yarn\bin;C:\Lua\bin;C:\Lua\LuaRocks;C:\Users\adamh\AppData\Roaming\LuaRocks\bin
Reading framework settings
Frameworks: netstandard2.1, netstandard1.3, net452
INFO [03/02/21 16:49:46:10] Working directory: .
INFO [03/02/21 16:49:46:15] Branch from build environment:
INFO [03/02/21 16:49:46:15] Project root is: E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\
INFO [03/02/21 16:49:46:15] DotGit directory is: E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git
INFO [03/02/21 16:49:46:15] Begin: Normalizing git directory for branch ''
  INFO [03/02/21 16:49:46:18] One remote found (origin -> 'https://github.com/chroma-sdk/Colore').
  INFO [03/02/21 16:49:46:18] Fetching from remote 'origin' using the following refspecs: +refs/heads/*:refs/remotes/origin/*.
  INFO [03/02/21 16:49:46:63] Creating local branch from remote tracking 'refs/remotes/origin/develop'.
  INFO [03/02/21 16:49:46:68] Creating local branch from remote tracking 'refs/remotes/origin/feature/connected-devices'.
  INFO [03/02/21 16:49:46:71] Creating local branch from remote tracking 'refs/remotes/origin/gh-pages'.
  INFO [03/02/21 16:49:46:74] Skipping update of 'refs/remotes/origin/master' as it already matches the remote ref.
  INFO [03/02/21 16:49:46:74] HEAD points at branch 'refs/heads/release/6.0.0'.
  INFO [03/02/21 16:49:46:75] End: Normalizing git directory for branch '' (Took: 597.18ms)
  INFO [03/02/21 16:49:46:76] Begin: Loading version variables from disk cache
    INFO [03/02/21 16:49:46:76] Cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\A43BE67947028B24E7DC3B4F78AED2342B9193DF.yml not found.
  INFO [03/02/21 16:49:46:76] End: Loading version variables from disk cache (Took: 1.71ms)
  INFO [03/02/21 16:49:46:86] Using latest commit on specified branch
  INFO [03/02/21 16:49:46:90] Running against branch: release/6.0.0 (baba344 Detect non-connected devices in QueryDevice)
  INFO [03/02/21 16:49:46:90] Begin: Calculating base versions
    INFO [03/02/21 16:49:46:94] Fallback base version: 0.1.0 with commit count source d6bc761fdf2d749d605e74d984c1155814c7053c
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc14': 6.0.0-rc.14 with commit count source ddef2ab82507467cf1d1541aeb04abb49844d01e
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc13': 6.0.0-rc.13 with commit count source 235ded26d5b52b6f4d69ee24ab2a4114ec4aed73
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc12': 6.0.0-rc.12 with commit count source 65b54756c06d6041bc50358a310f1c6de4241a53
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc11': 6.0.0-rc.11 with commit count source 0c2c2abe26c5cd6473949922c75516b463a55aea
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc10': 6.0.0-rc.10 with commit count source 45e2567ed630bea2748bda2827faa1073654fa07
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc9': 6.0.0-rc.9 with commit count source 772495e3ba49288cc54e8c8ab954742da426a62a
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc8': 6.0.0-rc.8 with commit count source 740cd3afe5576ad8bb022c8adc607c952183ae7d
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc7': 6.0.0-rc.7 with commit count source c760551e2f42f8aa1638a3b57ba87cf2c56da829
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc6': 6.0.0-rc.6 with commit count source 142ebfe84b6db47fe73c37c522e66eb1e7011ddf
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc5': 6.0.0-rc.5 with commit count source 54beb2eb0f43fc426f69be909b4151aa9f7d1a3f
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc4': 6.0.0-rc.4 with commit count source ea2d8e8f6c5c46ae544ba308ad83d858f9138336
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc3': 6.0.0-rc.3 with commit count source 16810b42f91f2012e17ba92fd2c28681df13dac3
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc2': 6.0.0-rc.2 with commit count source e1032b9e85efce438b61d66266aab6a3e3c6818f
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc1': 6.0.0-rc.1 with commit count source 0cbf727aafae04d5ca0d5f393c10229438bcd16b
    INFO [03/02/21 16:49:47:06] Git tag 'v5.2.0': 5.2.0 with commit count source ad27da8b5fda8d596ab6a9ddabf7f6a0ac4c8cfe
    INFO [03/02/21 16:49:47:06] Git tag 'v5.1.0': 5.1.0 with commit count source 1526642cf223b47a9d63650b8af09556fc039085
    INFO [03/02/21 16:49:47:06] Git tag 'v5.0.0': 5.0.0 with commit count source af61ee712e4322b0caaf826e733eecd5ad15a623
    INFO [03/02/21 16:49:47:06] Git tag 'v4.0.0': 4.0.0 with commit count source c9b9b0549e505f468f68edc5f16987e8b60cd95c
    INFO [03/02/21 16:49:47:06] Git tag 'v3.0.2': 3.0.2 with commit count source 71c6a4b43760a299b55c8e4d3037b72f5961cb37
    INFO [03/02/21 16:49:47:07] Git tag 'v3.0.1': 3.0.1 with commit count source eb309ebd861f5cd987d2aebebc47a4b99ca95aae
    INFO [03/02/21 16:49:47:07] Git tag 'v3.0.0': 3.0.0 with commit count source 73d58c1bc4e5b4b78c67f10ba9d4d2e013d517ab
    INFO [03/02/21 16:49:47:07] Git tag 'v2.3.2': 2.3.2 with commit count source 3a76cc544c5e5d479d0f25f0906557915b23e005
    INFO [03/02/21 16:49:47:07] Git tag 'v2.3.1': 2.3.1 with commit count source 379e40b92d09c0bbdd4ea8dcb0d7b25d71eb63a1
    INFO [03/02/21 16:49:47:07] Git tag 'v2.3.0': 2.3.0 with commit count source 5587348eeb3678a9c3698f2e5b230ee7cf1ddb2a
    INFO [03/02/21 16:49:47:07] Git tag 'v2.2.2': 2.2.2 with commit count source 0372daee75f82da5d53c76bfbf183116423878d4
    INFO [03/02/21 16:49:47:07] Git tag 'v2.2.1': 2.2.1 with commit count source 16c9b0ab31c248dfa9bb7b470ad69866b811b018
    INFO [03/02/21 16:49:47:07] Git tag 'v2.2.0': 2.2.0 with commit count source 1c7ec4f6ff210bdb57793437d9846ac86d543827
    INFO [03/02/21 16:49:47:07] Git tag 'v2.1.0': 2.1.0 with commit count source de058ce792d12bc2ed501e76c26530354b768ade
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.3': 2.0.3 with commit count source 72084e5aef802ffd7e81969562753dd18498b3e6
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.2': 2.0.2 with commit count source 3f35a05c6dd21814d827a6ce9932a6284c3a87c3
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.1': 2.0.1 with commit count source 4cddaad720bacabc6dd02ce6c0091e89acca5f09
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.0': 2.0.0 with commit count source 9bb3684d943fe209fbf7cbade15d35a41a707752
    INFO [03/02/21 16:49:47:07] Git tag 'v1.0.53': 1.0.53 with commit count source ca32f890ed167daa36a7af9a8597b2e1c159d72c
    INFO [03/02/21 16:49:47:07] Git tag 'v1.0.48': 1.0.48 with commit count source f5b62eafbc0c80e48a0c177fd29c3fc17eacf72c
    INFO [03/02/21 16:49:47:07] Git tag 'v1.0.43': 1.0.43 with commit count source 65681b038d7ddb38a4d6e0d886c5ab3c0997ebea
    INFO [03/02/21 16:49:47:07] Begin: Finding branch source of 'release/6.0.0'
      INFO [03/02/21 16:49:47:08] Begin: Finding merge base between 'release/6.0.0' and 'develop'.
        INFO [03/02/21 16:49:47:09] Found merge base of baba344 Detect non-connected devices in QueryDevice
        INFO [03/02/21 16:49:47:09] Merge base of release/6.0.0' and 'develop is baba344 Detect non-connected devices in QueryDevice
      INFO [03/02/21 16:49:47:09] End: Finding merge base between 'release/6.0.0' and 'develop'. (Took: 11.24ms)
      INFO [03/02/21 16:49:47:09] Begin: Finding merge base between 'release/6.0.0' and 'master'.
        INFO [03/02/21 16:49:47:09] Found merge base of baba344 Detect non-connected devices in QueryDevice
        INFO [03/02/21 16:49:47:10] Merge base of release/6.0.0' and 'master is baba344 Detect non-connected devices in QueryDevice
      INFO [03/02/21 16:49:47:10] End: Finding merge base between 'release/6.0.0' and 'master'. (Took: 3.97ms)
      INFO [03/02/21 16:49:47:10] Multiple source branches have been found, picking the first one (develop).
This may result in incorrect commit counting.
Options were:
develop, master
    INFO [03/02/21 16:49:47:10] End: Finding branch source of 'release/6.0.0' (Took: 30.42ms)
    INFO [03/02/21 16:49:47:10] Version in branch name: 6.0.0 with commit count source baba3443c323d4654a8e12fd6751507c6911f0f1
    INFO [03/02/21 16:49:47:15] Found multiple base versions which will produce the same SemVer (6.0.0), taking oldest source for commit counting (Version in branch name)
    INFO [03/02/21 16:49:47:15] Base version used: Version in branch name: 6.0.0 with commit count source baba3443c323d4654a8e12fd6751507c6911f0f1
  INFO [03/02/21 16:49:47:15] End: Calculating base versions (Took: 245.20ms)
  INFO [03/02/21 16:49:47:15] 0 commits found between baba344 Detect non-connected devices in QueryDevice and baba344 Detect non-connected devices in QueryDevice
  INFO [03/02/21 16:49:47:15] Skipping version increment
  INFO [03/02/21 16:49:47:15] 0 commits found between baba344 Detect non-connected devices in QueryDevice and baba344 Detect non-connected devices in QueryDevice
  INFO [03/02/21 16:49:47:15] Begin: Getting version tags from branch 'refs/heads/release/6.0.0'.
  INFO [03/02/21 16:49:47:18] End: Getting version tags from branch 'refs/heads/release/6.0.0'. (Took: 27.74ms)
  INFO [03/02/21 16:49:47:18] Begin: Creating dictionary
  INFO [03/02/21 16:49:47:19] End: Creating dictionary (Took: 4.21ms)
  INFO [03/02/21 16:49:47:19] Begin: Storing version variables to cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\A43BE67947028B24E7DC3B4F78AED2342B9193DF.yml
  INFO [03/02/21 16:49:47:22] End: Storing version variables to cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\A43BE67947028B24E7DC3B4F78AED2342B9193DF.yml (Took: 25.56ms)
Executing GenerateSetVersionMessage for 'AppVeyor'.
  ERROR [03/02/21 16:49:47:24] An unexpected error occurred:
System.ArgumentNullException: Value cannot be null. (Parameter 'uriString')
   at System.Uri..ctor(String uriString)
   at GitVersion.BuildAgents.AppVeyor.GetHttpClient() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\BuildAgents\AppVeyor.cs:line 60
   at GitVersion.BuildAgents.AppVeyor.GenerateSetVersionMessage(VersionVariables variables) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\BuildAgents\AppVeyor.cs:line 24
   at GitVersion.BuildAgentBase.WriteIntegration(Action`1 writer, VersionVariables variables, Boolean updateBuildNumber) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\BuildAgentBase.cs:line 41
   at GitVersion.VersionConverters.OutputGenerator.OutputGenerator.Execute(VersionVariables variables, OutputContext context) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionConverters\OutputGenerator\OutputGenerator.cs:line 37
   at GitVersion.GitVersionOutputTool.OutputVariables(VersionVariables variables, Boolean updateBuildNumber) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionOutputTool.cs:line 42
   at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 65
  INFO [03/02/21 16:49:47:24] Attempting to show the current git graph (please include in issue):
  INFO [03/02/21 16:49:47:25] Showing max of 100 commits
  INFO [03/02/21 16:49:47:32] * a1a506ae 19 hours ago  (origin/gh-pages, gh-pages)
* d8813248 19 hours ago
* 7b413d3e 20 hours ago
* b116f567 20 hours ago
* 65cd4000 9 months ago
* c300fcff 9 months ago
* fe6ebead 9 months ago
* 541839eb 9 months ago
* 01d15f35 2 years ago
* d732f580 2 years ago
* 3bc0f159 2 years ago
* 76e73ee2 2 years, 1 month ago
* 208abc6a 2 years, 2 months ago
* 53f7315d 2 years, 2 months ago
* c7a6ac85 2 years, 8 months ago
* 47600606 2 years, 9 months ago
* f5ab342e 2 years, 9 months ago
* ea0c6bfb 2 years, 9 months ago
* 475964e1 2 years, 9 months ago
* 95a9a693 2 years, 10 months ago
* beb3cf0f 2 years, 10 months ago
* 1d4d0a35 2 years, 10 months ago
* 22b4ab34 2 years, 10 months ago
* 6835bb61 2 years, 10 months ago
* a3b1e132 2 years, 10 months ago
* 43b3d568 2 years, 10 months ago
* a79ebb44 2 years, 10 months ago
* 88ff5029 2 years, 10 months ago
* 6e5e6fe2 2 years, 10 months ago
* d4af9a1b 2 years, 10 months ago
* 269bb796 2 years, 10 months ago
* a907192f 2 years, 10 months ago
* 4a2d7cfe 2 years, 10 months ago
* 5928f4f6 2 years, 10 months ago
* e1e2aa54 2 years, 10 months ago
* c3e08d76 2 years, 10 months ago
* 3e58ad4b 2 years, 10 months ago
* c3cc3b22 2 years, 10 months ago
* b020cdf9 2 years, 10 months ago
* 9c4e3aa3 2 years, 10 months ago
* 56f9643c 2 years, 10 months ago
* 6914b254 2 years, 10 months ago
* 4304a36a 2 years, 10 months ago
* f95f177f 2 years, 10 months ago
* ac537aec 2 years, 10 months ago
* 21617ed0 2 years, 10 months ago
* 36a5fc29 2 years, 10 months ago
* b8d32f70 2 years, 10 months ago
* cfd8e394 2 years, 10 months ago
* 2ac977f9 2 years, 10 months ago
* b9a177a5 2 years, 11 months ago
* 4724c9a7 2 years, 11 months ago
* d32b5fc7 3 years ago
* 7582f252 3 years ago
* f0a8e946 3 years ago
* c70de027 3 years ago
* 141f5ab0 3 years ago
* a554069c 3 years ago
* ec6c8489 3 years ago
* 13f7aa74 3 years ago
* 5dd676cf 3 years ago
* b5be7b91 3 years ago
* ab1be3cd 3 years, 3 months ago
* 141b97b4 3 years, 3 months ago
* fdcf5fa4 3 years, 3 months ago
* e6f73fde 3 years, 4 months ago
* 5fb42f32 3 years, 4 months ago
* a3e7b6ee 3 years, 4 months ago
* e703f3dd 3 years, 4 months ago
* 86a1af58 3 years, 4 months ago
* b46df5f4 3 years, 4 months ago
* e029fc15 3 years, 4 months ago
* 820bad27 3 years, 4 months ago
* a61d9e0e 3 years, 4 months ago
* 0ae549ef 3 years, 4 months ago
* df3c42d3 3 years, 4 months ago
* d6e240aa 3 years, 4 months ago
* 3d09e602 3 years, 4 months ago
* 01a23711 3 years, 4 months ago
* 47633b44 3 years, 4 months ago
* 20e49aeb 3 years, 4 months ago
* d0b79e87 3 years, 4 months ago
* 6a7ce038 3 years, 4 months ago
* 71686dcf 3 years, 4 months ago
* 715f799e 3 years, 4 months ago
* 08e61387 4 years, 3 months ago
* 2fdd1b00 4 years, 7 months ago
* a4d7aabb 4 years, 7 months ago
*   9dec7ee3 4 years, 7 months ago
|\
| * aa3c6bb4 4 years, 7 months ago
| * 630469c6 4 years, 7 months ago
| * 8f4cfd2d 4 years, 7 months ago
| * 3cd7ef06 4 years, 7 months ago
| * 4588bff3 4 years, 7 months ago
* | d9fad5aa 4 years, 7 months ago
|/
* d1b360a7 4 years, 7 months ago
* 1fcac2ab 4 years, 7 months ago
* dbce6c0a 4 years, 7 months ago
* a3ca4af1 5 years ago
* 3472f592 5 years ago

INFO [03/02/21 16:49:46:00] Applicable build agent found: 'AppVeyor'.
INFO [03/02/21 16:49:46:10] Working directory: .
INFO [03/02/21 16:49:46:15] Branch from build environment:
INFO [03/02/21 16:49:46:15] Project root is: E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\
INFO [03/02/21 16:49:46:15] DotGit directory is: E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git
INFO [03/02/21 16:49:46:15] Begin: Normalizing git directory for branch ''
  INFO [03/02/21 16:49:46:18] One remote found (origin -> 'https://github.com/chroma-sdk/Colore').
  INFO [03/02/21 16:49:46:18] Fetching from remote 'origin' using the following refspecs: +refs/heads/*:refs/remotes/origin/*.
  INFO [03/02/21 16:49:46:63] Creating local branch from remote tracking 'refs/remotes/origin/develop'.
  INFO [03/02/21 16:49:46:68] Creating local branch from remote tracking 'refs/remotes/origin/feature/connected-devices'.
  INFO [03/02/21 16:49:46:71] Creating local branch from remote tracking 'refs/remotes/origin/gh-pages'.
  INFO [03/02/21 16:49:46:74] Skipping update of 'refs/remotes/origin/master' as it already matches the remote ref.
  INFO [03/02/21 16:49:46:74] HEAD points at branch 'refs/heads/release/6.0.0'.
  INFO [03/02/21 16:49:46:75] End: Normalizing git directory for branch '' (Took: 597.18ms)
  INFO [03/02/21 16:49:46:76] Begin: Loading version variables from disk cache
    INFO [03/02/21 16:49:46:76] Cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\A43BE67947028B24E7DC3B4F78AED2342B9193DF.yml not found.
  INFO [03/02/21 16:49:46:76] End: Loading version variables from disk cache (Took: 1.71ms)
  INFO [03/02/21 16:49:46:86] Using latest commit on specified branch
  INFO [03/02/21 16:49:46:90] Running against branch: release/6.0.0 (baba344 Detect non-connected devices in QueryDevice)
  INFO [03/02/21 16:49:46:90] Begin: Calculating base versions
    INFO [03/02/21 16:49:46:94] Fallback base version: 0.1.0 with commit count source d6bc761fdf2d749d605e74d984c1155814c7053c
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc14': 6.0.0-rc.14 with commit count source ddef2ab82507467cf1d1541aeb04abb49844d01e
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc13': 6.0.0-rc.13 with commit count source 235ded26d5b52b6f4d69ee24ab2a4114ec4aed73
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc12': 6.0.0-rc.12 with commit count source 65b54756c06d6041bc50358a310f1c6de4241a53
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc11': 6.0.0-rc.11 with commit count source 0c2c2abe26c5cd6473949922c75516b463a55aea
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc10': 6.0.0-rc.10 with commit count source 45e2567ed630bea2748bda2827faa1073654fa07
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc9': 6.0.0-rc.9 with commit count source 772495e3ba49288cc54e8c8ab954742da426a62a
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc8': 6.0.0-rc.8 with commit count source 740cd3afe5576ad8bb022c8adc607c952183ae7d
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc7': 6.0.0-rc.7 with commit count source c760551e2f42f8aa1638a3b57ba87cf2c56da829
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc6': 6.0.0-rc.6 with commit count source 142ebfe84b6db47fe73c37c522e66eb1e7011ddf
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc5': 6.0.0-rc.5 with commit count source 54beb2eb0f43fc426f69be909b4151aa9f7d1a3f
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc4': 6.0.0-rc.4 with commit count source ea2d8e8f6c5c46ae544ba308ad83d858f9138336
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc3': 6.0.0-rc.3 with commit count source 16810b42f91f2012e17ba92fd2c28681df13dac3
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc2': 6.0.0-rc.2 with commit count source e1032b9e85efce438b61d66266aab6a3e3c6818f
    INFO [03/02/21 16:49:47:06] Git tag 'v6.0.0-rc1': 6.0.0-rc.1 with commit count source 0cbf727aafae04d5ca0d5f393c10229438bcd16b
    INFO [03/02/21 16:49:47:06] Git tag 'v5.2.0': 5.2.0 with commit count source ad27da8b5fda8d596ab6a9ddabf7f6a0ac4c8cfe
    INFO [03/02/21 16:49:47:06] Git tag 'v5.1.0': 5.1.0 with commit count source 1526642cf223b47a9d63650b8af09556fc039085
    INFO [03/02/21 16:49:47:06] Git tag 'v5.0.0': 5.0.0 with commit count source af61ee712e4322b0caaf826e733eecd5ad15a623
    INFO [03/02/21 16:49:47:06] Git tag 'v4.0.0': 4.0.0 with commit count source c9b9b0549e505f468f68edc5f16987e8b60cd95c
    INFO [03/02/21 16:49:47:06] Git tag 'v3.0.2': 3.0.2 with commit count source 71c6a4b43760a299b55c8e4d3037b72f5961cb37
    INFO [03/02/21 16:49:47:07] Git tag 'v3.0.1': 3.0.1 with commit count source eb309ebd861f5cd987d2aebebc47a4b99ca95aae
    INFO [03/02/21 16:49:47:07] Git tag 'v3.0.0': 3.0.0 with commit count source 73d58c1bc4e5b4b78c67f10ba9d4d2e013d517ab
    INFO [03/02/21 16:49:47:07] Git tag 'v2.3.2': 2.3.2 with commit count source 3a76cc544c5e5d479d0f25f0906557915b23e005
    INFO [03/02/21 16:49:47:07] Git tag 'v2.3.1': 2.3.1 with commit count source 379e40b92d09c0bbdd4ea8dcb0d7b25d71eb63a1
    INFO [03/02/21 16:49:47:07] Git tag 'v2.3.0': 2.3.0 with commit count source 5587348eeb3678a9c3698f2e5b230ee7cf1ddb2a
    INFO [03/02/21 16:49:47:07] Git tag 'v2.2.2': 2.2.2 with commit count source 0372daee75f82da5d53c76bfbf183116423878d4
    INFO [03/02/21 16:49:47:07] Git tag 'v2.2.1': 2.2.1 with commit count source 16c9b0ab31c248dfa9bb7b470ad69866b811b018
    INFO [03/02/21 16:49:47:07] Git tag 'v2.2.0': 2.2.0 with commit count source 1c7ec4f6ff210bdb57793437d9846ac86d543827
    INFO [03/02/21 16:49:47:07] Git tag 'v2.1.0': 2.1.0 with commit count source de058ce792d12bc2ed501e76c26530354b768ade
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.3': 2.0.3 with commit count source 72084e5aef802ffd7e81969562753dd18498b3e6
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.2': 2.0.2 with commit count source 3f35a05c6dd21814d827a6ce9932a6284c3a87c3
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.1': 2.0.1 with commit count source 4cddaad720bacabc6dd02ce6c0091e89acca5f09
    INFO [03/02/21 16:49:47:07] Git tag 'v2.0.0': 2.0.0 with commit count source 9bb3684d943fe209fbf7cbade15d35a41a707752
    INFO [03/02/21 16:49:47:07] Git tag 'v1.0.53': 1.0.53 with commit count source ca32f890ed167daa36a7af9a8597b2e1c159d72c
    INFO [03/02/21 16:49:47:07] Git tag 'v1.0.48': 1.0.48 with commit count source f5b62eafbc0c80e48a0c177fd29c3fc17eacf72c
    INFO [03/02/21 16:49:47:07] Git tag 'v1.0.43': 1.0.43 with commit count source 65681b038d7ddb38a4d6e0d886c5ab3c0997ebea
    INFO [03/02/21 16:49:47:07] Begin: Finding branch source of 'release/6.0.0'
      INFO [03/02/21 16:49:47:08] Begin: Finding merge base between 'release/6.0.0' and 'develop'.
        INFO [03/02/21 16:49:47:09] Found merge base of baba344 Detect non-connected devices in QueryDevice
        INFO [03/02/21 16:49:47:09] Merge base of release/6.0.0' and 'develop is baba344 Detect non-connected devices in QueryDevice
      INFO [03/02/21 16:49:47:09] End: Finding merge base between 'release/6.0.0' and 'develop'. (Took: 11.24ms)
      INFO [03/02/21 16:49:47:09] Begin: Finding merge base between 'release/6.0.0' and 'master'.
        INFO [03/02/21 16:49:47:09] Found merge base of baba344 Detect non-connected devices in QueryDevice
        INFO [03/02/21 16:49:47:10] Merge base of release/6.0.0' and 'master is baba344 Detect non-connected devices in QueryDevice
      INFO [03/02/21 16:49:47:10] End: Finding merge base between 'release/6.0.0' and 'master'. (Took: 3.97ms)
      INFO [03/02/21 16:49:47:10] Multiple source branches have been found, picking the first one (develop).
This may result in incorrect commit counting.
Options were:
develop, master
    INFO [03/02/21 16:49:47:10] End: Finding branch source of 'release/6.0.0' (Took: 30.42ms)
    INFO [03/02/21 16:49:47:10] Version in branch name: 6.0.0 with commit count source baba3443c323d4654a8e12fd6751507c6911f0f1
    INFO [03/02/21 16:49:47:15] Found multiple base versions which will produce the same SemVer (6.0.0), taking oldest source for commit counting (Version in branch name)
    INFO [03/02/21 16:49:47:15] Base version used: Version in branch name: 6.0.0 with commit count source baba3443c323d4654a8e12fd6751507c6911f0f1
  INFO [03/02/21 16:49:47:15] End: Calculating base versions (Took: 245.20ms)
  INFO [03/02/21 16:49:47:15] 0 commits found between baba344 Detect non-connected devices in QueryDevice and baba344 Detect non-connected devices in QueryDevice
  INFO [03/02/21 16:49:47:15] Skipping version increment
  INFO [03/02/21 16:49:47:15] 0 commits found between baba344 Detect non-connected devices in QueryDevice and baba344 Detect non-connected devices in QueryDevice
  INFO [03/02/21 16:49:47:15] Begin: Getting version tags from branch 'refs/heads/release/6.0.0'.
  INFO [03/02/21 16:49:47:18] End: Getting version tags from branch 'refs/heads/release/6.0.0'. (Took: 27.74ms)
  INFO [03/02/21 16:49:47:18] Begin: Creating dictionary
  INFO [03/02/21 16:49:47:19] End: Creating dictionary (Took: 4.21ms)
  INFO [03/02/21 16:49:47:19] Begin: Storing version variables to cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\A43BE67947028B24E7DC3B4F78AED2342B9193DF.yml
  INFO [03/02/21 16:49:47:22] End: Storing version variables to cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\A43BE67947028B24E7DC3B4F78AED2342B9193DF.yml (Took: 25.56ms)
  ERROR [03/02/21 16:49:47:24] An unexpected error occurred:
System.ArgumentNullException: Value cannot be null. (Parameter 'uriString')
   at System.Uri..ctor(String uriString)
   at GitVersion.BuildAgents.AppVeyor.GetHttpClient() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\BuildAgents\AppVeyor.cs:line 60
   at GitVersion.BuildAgents.AppVeyor.GenerateSetVersionMessage(VersionVariables variables) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\BuildAgents\AppVeyor.cs:line 24
   at GitVersion.BuildAgentBase.WriteIntegration(Action`1 writer, VersionVariables variables, Boolean updateBuildNumber) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\BuildAgentBase.cs:line 41
   at GitVersion.VersionConverters.OutputGenerator.OutputGenerator.Execute(VersionVariables variables, OutputContext context) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\VersionConverters\OutputGenerator\OutputGenerator.cs:line 37
   at GitVersion.GitVersionOutputTool.OutputVariables(VersionVariables variables, Boolean updateBuildNumber) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionOutputTool.cs:line 42
   at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 65
  INFO [03/02/21 16:49:47:24] Attempting to show the current git graph (please include in issue):
  INFO [03/02/21 16:49:47:25] Showing max of 100 commits
  INFO [03/02/21 16:49:47:32] * a1a506ae 19 hours ago  (origin/gh-pages, gh-pages)
* d8813248 19 hours ago
* 7b413d3e 20 hours ago
* b116f567 20 hours ago
* 65cd4000 9 months ago
* c300fcff 9 months ago
* fe6ebead 9 months ago
* 541839eb 9 months ago
* 01d15f35 2 years ago
* d732f580 2 years ago
* 3bc0f159 2 years ago
* 76e73ee2 2 years, 1 month ago
* 208abc6a 2 years, 2 months ago
* 53f7315d 2 years, 2 months ago
* c7a6ac85 2 years, 8 months ago
* 47600606 2 years, 9 months ago
* f5ab342e 2 years, 9 months ago
* ea0c6bfb 2 years, 9 months ago
* 475964e1 2 years, 9 months ago
* 95a9a693 2 years, 10 months ago
* beb3cf0f 2 years, 10 months ago
* 1d4d0a35 2 years, 10 months ago
* 22b4ab34 2 years, 10 months ago
* 6835bb61 2 years, 10 months ago
* a3b1e132 2 years, 10 months ago
* 43b3d568 2 years, 10 months ago
* a79ebb44 2 years, 10 months ago
* 88ff5029 2 years, 10 months ago
* 6e5e6fe2 2 years, 10 months ago
* d4af9a1b 2 years, 10 months ago
* 269bb796 2 years, 10 months ago
* a907192f 2 years, 10 months ago
* 4a2d7cfe 2 years, 10 months ago
* 5928f4f6 2 years, 10 months ago
* e1e2aa54 2 years, 10 months ago
* c3e08d76 2 years, 10 months ago
* 3e58ad4b 2 years, 10 months ago
* c3cc3b22 2 years, 10 months ago
* b020cdf9 2 years, 10 months ago
* 9c4e3aa3 2 years, 10 months ago
* 56f9643c 2 years, 10 months ago
* 6914b254 2 years, 10 months ago
* 4304a36a 2 years, 10 months ago
* f95f177f 2 years, 10 months ago
* ac537aec 2 years, 10 months ago
* 21617ed0 2 years, 10 months ago
* 36a5fc29 2 years, 10 months ago
* b8d32f70 2 years, 10 months ago
* cfd8e394 2 years, 10 months ago
* 2ac977f9 2 years, 10 months ago
* b9a177a5 2 years, 11 months ago
* 4724c9a7 2 years, 11 months ago
* d32b5fc7 3 years ago
* 7582f252 3 years ago
* f0a8e946 3 years ago
* c70de027 3 years ago
* 141f5ab0 3 years ago
* a554069c 3 years ago
* ec6c8489 3 years ago
* 13f7aa74 3 years ago
* 5dd676cf 3 years ago
* b5be7b91 3 years ago
* ab1be3cd 3 years, 3 months ago
* 141b97b4 3 years, 3 months ago
* fdcf5fa4 3 years, 3 months ago
* e6f73fde 3 years, 4 months ago
* 5fb42f32 3 years, 4 months ago
* a3e7b6ee 3 years, 4 months ago
* e703f3dd 3 years, 4 months ago
* 86a1af58 3 years, 4 months ago
* b46df5f4 3 years, 4 months ago
* e029fc15 3 years, 4 months ago
* 820bad27 3 years, 4 months ago
* a61d9e0e 3 years, 4 months ago
* 0ae549ef 3 years, 4 months ago
* df3c42d3 3 years, 4 months ago
* d6e240aa 3 years, 4 months ago
* 3d09e602 3 years, 4 months ago
* 01a23711 3 years, 4 months ago
* 47633b44 3 years, 4 months ago
* 20e49aeb 3 years, 4 months ago
* d0b79e87 3 years, 4 months ago
* 6a7ce038 3 years, 4 months ago
* 71686dcf 3 years, 4 months ago
* 715f799e 3 years, 4 months ago
* 08e61387 4 years, 3 months ago
* 2fdd1b00 4 years, 7 months ago
* a4d7aabb 4 years, 7 months ago
*   9dec7ee3 4 years, 7 months ago
|\
| * aa3c6bb4 4 years, 7 months ago
| * 630469c6 4 years, 7 months ago
| * 8f4cfd2d 4 years, 7 months ago
| * 3cd7ef06 4 years, 7 months ago
| * 4588bff3 4 years, 7 months ago
* | d9fad5aa 4 years, 7 months ago
|/
* d1b360a7 4 years, 7 months ago
* 1fcac2ab 4 years, 7 months ago
* dbce6c0a 4 years, 7 months ago
* a3ca4af1 5 years ago
* 3472f592 5 years ago

  INFO [03/02/21 16:49:47:35] Done writing

----------------------------------------
Teardown
----------------------------------------
Finished running tasks.
Error: One or more errors occurred. (GitVersion: Process returned an error (exit code 1).)
        GitVersion: Process returned an error (exit code 1).
asbjornu commented 3 years ago

@asbjornu That generates a different error about a URI being null.

Yes, seems like there's more environment variables needed:

https://github.com/GitTools/GitVersion/blob/eba8d12748c7dbd8b18937764445235c545858bb/src/GitVersion.Core/BuildAgents/AppVeyor.cs#L22

https://github.com/GitTools/GitVersion/blob/eba8d12748c7dbd8b18937764445235c545858bb/src/GitVersion.Core/BuildAgents/AppVeyor.cs#L62

https://github.com/GitTools/GitVersion/blob/eba8d12748c7dbd8b18937764445235c545858bb/src/GitVersion.Core/BuildAgents/AppVeyor.cs#L76

If you define all of these, what then?

Sharparam commented 3 years ago

@asbjornu Sorry, got occupied with some things. When APPVEYOR_API_URL is defined then an attempt is made to make some call to it, which fails since there's no AppVeyor API running on my machine.

Are we going to end up having to mock the entire AppVeyor API? :p

asbjornu commented 3 years ago

Haha, I hope not! 😄 Okay, perhaps this is not a viable road to walk in order to reproduce the problem. I just don't have any better ideas on how to reproduce it.

Sharparam commented 3 years ago

Ok turns out there's only really two APIs to mock[1][2], which was easy enough to do with MockServer.

MockServer expectations JSON ```json [ { "id": "update-build-details", "httpRequest": { "method": "PUT", "path": "/api/build" }, "httpResponse": { "statusCode": 200, "reasonPhrase": "OK", "body": "" } }, { "id": "set-environment-variable", "httpRequest": { "method": "POST", "path": "/api/build/variables" }, "httpResponse": { "statusCode": 200, "reasonPhrase": "OK", "body": "" } } ] ```

After doing that and faking a bunch of the AppVeyor environment variables the build seems to run fine locally.

AppVeyor helper script (PowerShell) ```powershell $env:APPVEYOR = "True" $env:APPVEYOR_ACCOUNT_NAME = "chroma-sdk" $env:APPVEYOR_API_URL = "http://localhost:49673/" $env:APPVEYOR_BUILD_AGENT_HYPERV_NIC_CONFIGURED = "true" $env:APPVEYOR_BUILD_FOLDER = "E:\Users\adamh\Projects\CSharp\colore_gitversion_debug" $env:APPVEYOR_BUILD_ID = "38005297" $env:APPVEYOR_BUILD_NUMBER = "227" $env:APPVEYOR_BUILD_VERSION = "227" $env:APPVEYOR_BUILD_WORKER_IMAGE = "Visual Studio 2019" $env:APPVEYOR_JOB_ID = "h4874l8kcthu4rw0" $env:APPVEYOR_JOB_NUMBER = "1" $env:APPVEYOR_PROJECT_ID = "476284" $env:APPVEYOR_PROJECT_NAME = "Colore" $env:APPVEYOR_PROJECT_SLUG = "colore" $env:APPVEYOR_REPO_BRANCH = "pull/285/merge" $env:APPVEYOR_REPO_COMMIT = "baba3443c323d4654a8e12fd6751507c6911f0f1" $env:APPVEYOR_REPO_COMMIT_AUTHOR = "Adam Hellberg" $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL = "sharparam@sharparam.com" $env:APPVEYOR_REPO_COMMIT_MESSAGE = @" Detect non-connected devices in QueryDevice If the SDK returns the ERROR_DEVICE_NOT_CONNECTED error when calling the QueryDevice API, do not throw a NativeCallException but instead detect this error and return a device info struct where the connected count is set to zero. A new enum member "Unknown" is added to the DeviceType enumeration to cover this use case. Fixes #284. "@ $env:APPVEYOR_REPO_COMMIT_TIMESTAMP = "2021-03-01T16:26:45Z" $env:APPVEYOR_REPO_NAME = "chroma-sdk/Colore" $env:APPVEYOR_REPO_PROVIDER = "gitHub" $env:APPVEYOR_REPO_SCM = "git" $env:APPVEYOR_REPO_TAG = "false" $env:APPVEYOR_URL = "https://ci.appveyor.com" & dotnet cake --target=Clean ```
Build output ``` Tool GitVersion.Tool is already installed, with required version. Tool dotnet-reportgenerator-globaltool is already installed, with required version. The assembly 'Cake.DocFx, Version=0.13.1.0, Culture=neutral, PublicKeyToken=null' is referencing an older version of Cake.Core (0.33.0). For best compatibility it should target Cake.Core version 1.0.0. E:/Users/adamh/Projects/CSharp/colore_gitversion_debug/build.cake(203,13): warning CS0618: 'DotNetCoreTestSettings.Logger' is obsolete: 'Please use Loggers instead.' E:/Users/adamh/Projects/CSharp/colore_gitversion_debug/build.cake(207,13): warning CS0618: 'DotNetCoreTestSettings.Logger' is obsolete: 'Please use Loggers instead.' ---------------------------------------- Setup ---------------------------------------- PATH is C:\Program Files\PowerShell\7;E:\Oculus\Support\oculus-runtime;C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;E:\Program Files\ImageMagick-7.0.3-Q16;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;E:\ffmpeg\bin;E:\Program Files (x86)\CMake\bin;E:\MinGW\bin;C:\Users\adamh\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\GtkSharp\2.12\bin;E:\Program Files (x86)\gs\gs9.20\bin;E:\Users\adamh\AppData\Local\Android\sdk\platform-tools;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\doxygen\bin;E:\Program Files (x86)\Graphviz2.38\bin;E:\Program Files (x86)\LINQPad5;E:\youtube-dl;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;E:\PuTTY\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\System32\OpenSSH\;E:\Program Files\CMake\bin;E:\Program Files\LLVM\bin;E:\tools\ninja\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\olm;E:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;E:\Program Files (x86)\GnuPG\bin;E:\bin;E:\Program Files\nodejs\;E:\Program Files (x86)\Yarn\bin\;C:\Program Files (x86)\dotnet\;C:\Program Files\PowerShell\7\;E:\Program Files\Pandoc\;C:\texlive\2020\bin\win32;E:\Program Files\Git\cmd;C:\Users\adamh\scoop\shims;C:\Users\adamh\.cargo\bin;C:\Ruby25-x64\bin;C:\Users\adamh\.dotnet\tools;C:\Users\adamh\AppData\Local\atom\bin;C:\Users\adamh\AppData\Roaming\Python\Python37\Scripts;E:\Program Files (x86)\LilyPond\usr\bin;C:\Program Files (x86)\Atmel\Flip 3.4.7\bin;C:\rakudo\bin;C:\rakudo\share\perl6\site\bin;C:\Users\adamh\AppData\Local\Keybase\;C:\Users\adamh\AppData\Local\Microsoft\WindowsApps;E:\Program Files\Inkscape\bin;C:\Users\adamh\.dotnet\tools;C:\Users\adamh\AppData\Roaming\npm;C:\Users\adamh\AppData\Local\Yarn\bin;C:\Lua\bin;C:\Lua\LuaRocks;C:\Users\adamh\AppData\Roaming\LuaRocks\bin Reading framework settings Frameworks: netstandard2.1, netstandard1.3, net452 INFO [03/04/21 15:36:20:36] Working directory: . INFO [03/04/21 15:36:20:39] Branch from build environment: pull/285/merge INFO [03/04/21 15:36:20:40] Project root is: E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\ INFO [03/04/21 15:36:20:40] DotGit directory is: E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git INFO [03/04/21 15:36:20:40] Begin: Normalizing git directory for branch 'pull/285/merge' INFO [03/04/21 15:36:20:43] One remote found (origin -> 'https://github.com/chroma-sdk/Colore'). INFO [03/04/21 15:36:20:43] Fetching from remote 'origin' using the following refspecs: +refs/heads/*:refs/remotes/origin/*. INFO [03/04/21 15:36:20:93] Updating local branch pull/285/merge to match ref pull/285/merge INFO [03/04/21 15:36:20:99] Skipping update of 'refs/remotes/origin/develop' as it already matches the remote ref. INFO [03/04/21 15:36:20:99] Skipping update of 'refs/remotes/origin/gh-pages' as it already matches the remote ref. INFO [03/04/21 15:36:20:99] Skipping update of 'refs/remotes/origin/feature/connected-devices' as it already matches the remote ref. INFO [03/04/21 15:36:21:00] Skipping update of 'refs/remotes/origin/master' as it already matches the remote ref. INFO [03/04/21 15:36:21:00] HEAD points at branch 'refs/heads/pull/285/merge'. INFO [03/04/21 15:36:21:00] End: Normalizing git directory for branch 'pull/285/merge' (Took: 608.18ms) INFO [03/04/21 15:36:21:02] Begin: Loading version variables from disk cache INFO [03/04/21 15:36:21:02] Begin: Deserializing version variables from cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\FC1B65ABAED0E80B8C82E46D365E3711C9AAF843.yml INFO [03/04/21 15:36:21:07] End: Deserializing version variables from cache file E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\.git\gitversion_cache\FC1B65ABAED0E80B8C82E46D365E3711C9AAF843.yml (Took: 48.73ms) INFO [03/04/21 15:36:21:07] End: Loading version variables from disk cache (Took: 49.31ms) Executing GenerateSetVersionMessage for 'AppVeyor'. Set AppVeyor build number to '6.0.0-pr0285.46'. Executing GenerateBuildLogOutput for 'AppVeyor'. Adding Environment Variable. name='GitVersion_Major' value='6'] Adding Environment Variable. name='GitVersion_Minor' value='0'] Adding Environment Variable. name='GitVersion_Patch' value='0'] Adding Environment Variable. name='GitVersion_PreReleaseTag' value='pr0285.46'] Adding Environment Variable. name='GitVersion_PreReleaseTagWithDash' value='-pr0285.46'] Adding Environment Variable. name='GitVersion_PreReleaseLabel' value='pr0285'] Adding Environment Variable. name='GitVersion_PreReleaseLabelWithDash' value='-pr0285'] Adding Environment Variable. name='GitVersion_PreReleaseNumber' value='46'] Adding Environment Variable. name='GitVersion_WeightedPreReleaseNumber' value='30046'] Adding Environment Variable. name='GitVersion_BuildMetaData' value=''] Adding Environment Variable. name='GitVersion_BuildMetaDataPadded' value=''] Adding Environment Variable. name='GitVersion_FullBuildMetaData' value='Branch.pull-285-merge.Sha.baba3443c323d4654a8e12fd6751507c6911f0f1'] Adding Environment Variable. name='GitVersion_MajorMinorPatch' value='6.0.0'] Adding Environment Variable. name='GitVersion_SemVer' value='6.0.0-pr0285.46'] Adding Environment Variable. name='GitVersion_LegacySemVer' value='6.0.0-pr0285-46'] Adding Environment Variable. name='GitVersion_LegacySemVerPadded' value='6.0.0-pr0285-0046'] Adding Environment Variable. name='GitVersion_AssemblySemVer' value='6.0.0.46'] Adding Environment Variable. name='GitVersion_AssemblySemFileVer' value='6.0.0.0'] Adding Environment Variable. name='GitVersion_FullSemVer' value='6.0.0-pr0285.46'] Adding Environment Variable. name='GitVersion_InformationalVersion' value='6.0.0-pr0285.46+Branch.pull-285-merge.Sha.baba3443c323d4654a8e12fd6751507c6911f0f1'] Adding Environment Variable. name='GitVersion_BranchName' value='pull/285/merge'] Adding Environment Variable. name='GitVersion_EscapedBranchName' value='pull-285-merge'] Adding Environment Variable. name='GitVersion_Sha' value='baba3443c323d4654a8e12fd6751507c6911f0f1'] Adding Environment Variable. name='GitVersion_ShortSha' value='baba344'] Adding Environment Variable. name='GitVersion_NuGetVersionV2' value='6.0.0-pr0285-0046'] Adding Environment Variable. name='GitVersion_NuGetVersion' value='6.0.0-pr0285-0046'] Adding Environment Variable. name='GitVersion_NuGetPreReleaseTagV2' value='pr0285-0046'] Adding Environment Variable. name='GitVersion_NuGetPreReleaseTag' value='pr0285-0046'] Adding Environment Variable. name='GitVersion_VersionSourceSha' value='ddef2ab82507467cf1d1541aeb04abb49844d01e'] Adding Environment Variable. name='GitVersion_CommitsSinceVersionSource' value='46'] Adding Environment Variable. name='GitVersion_CommitsSinceVersionSourcePadded' value='0046'] Adding Environment Variable. name='GitVersion_UncommittedChanges' value='1'] Adding Environment Variable. name='GitVersion_CommitDate' value='2021-03-01'] INFO [03/04/21 15:36:21:60] Done writing Version: 6.0.0-pr0285.46 on 2021-03-01 Commit hash: baba3443c323d4654a8e12fd6751507c6911f0f1 ======================================== Clean ======================================== Cleaning output directories Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Copyright (C) Microsoft Corporation. All rights reserved. Build started 2021-03-04 15:36:23. 1>Project "E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\Colore.sln" on node 1 (Clean target(s)). 1>ValidateSolutionConfiguration: Building solution configuration "Debug|Any CPU". 1>Done Building Project "E:\Users\adamh\Projects\CSharp\colore_gitversion_debug\Colore.sln" (Clean target(s)). Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:00.64 ---------------------------------------- Teardown ---------------------------------------- Finished running tasks. Task Duration -------------------------------------------------- Setup 00:00:02.6275521 Clean 00:00:01.2002292 Teardown 00:00:00.0005479 -------------------------------------------------- Total: 00:00:03.8283292 ```

So I guess either this is something that is:

  1. Hard to re-produce at all.
  2. Something happening because of something very specific in the AppVeyor environment.
  3. An intermittent/random failure.
asbjornu commented 2 years ago

Is this bug still present and reproducible? If so, please reopen.

ermshiperete commented 2 years ago

Yes, this bug is still present in 5.8.3. I don't have permission to re-open this issue.

I created a tiny repo with two branches, master and feature/nuget and a PR that feature/foo that will be merged into feature/nuget: https://github.com/ermshiperete/GitVersionBug/

The failing AppVeyor build is here: https://ci.appveyor.com/project/ermshiperete/gitversionbug/builds/42813634 It fails with

msbuild "C:\projects\gitversionbug\GitVersionBug.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
  INFO [03/07/22 15:11:12:71] Applicable build agent found: 'AppVeyor'.
  INFO [03/07/22 15:11:12:78] Working directory: C:\projects\gitversionbug\GitVersionBug
  INFO [03/07/22 15:11:12:84] Branch from build environment: feature/foo
  INFO [03/07/22 15:11:12:84] Project root is: C:\projects\gitversionbug\
  INFO [03/07/22 15:11:12:84] DotGit directory is: C:\projects\gitversionbug\.git
  INFO [03/07/22 15:11:12:84] Begin: Normalizing git directory for branch 'feature/foo'
    INFO [03/07/22 15:11:12:92] One remote found (origin -> 'https://github.com/ermshiperete/GitVersionBug.git').
    INFO [03/07/22 15:11:12:93] Fetching from remote 'origin' using the following refspecs: +refs/heads/*:refs/remotes/origin/*.
    INFO [03/07/22 15:11:13:15] Creating local branch feature/foo pointing at fd3b7b8
    INFO [03/07/22 15:11:13:20] Creating local branch from remote tracking 'refs/remotes/origin/feature/nuget'.
    INFO [03/07/22 15:11:13:23] Skipping update of 'refs/remotes/origin/master' as it already matches the remote ref.
    INFO [03/07/22 15:11:13:25] HEAD points at branch 'refs/heads/feature/foo'.
    INFO [03/07/22 15:11:13:25] End: Normalizing git directory for branch 'feature/foo' (Took: 407.37ms)
    ERROR [03/07/22 15:11:13:28] An unexpected error occurred:
  GitVersion.BugException: GitVersion has a bug, your HEAD has moved after repo normalisation.

  To disable this error set an environmental variable called IGNORE_NORMALISATION_GIT_HEAD_MOVE to 1

  Please run `git log --graph --format="%h %cr %d" --decorate --date=relative --all --remotes=* -n 100` and submit it along with your build log (with personal info removed) in a new issue at https://github.com/GitTools/GitVersion
     at GitVersion.GitPreparer.NormalizeGitDirectory(Boolean noFetch, String currentBranchName, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 275
     at GitVersion.GitPreparer.NormalizeGitDirectory(String targetBranch, Boolean isDynamicRepository) in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitPreparer.cs:line 140
     at GitVersion.GitVersionCalculateTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersion.Core\Core\GitVersionCalculateTool.cs:line 50
     at GitVersion.GitVersionExecutor.RunGitVersionTool(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersion.App\GitVersionExecutor.cs:line 66
    INFO [03/07/22 15:11:13:28] Attempting to show the current git graph (please include in issue): 
    INFO [03/07/22 15:11:13:28] Showing max of 100 commits
    INFO [03/07/22 15:11:13:36] * fd3b7b8 3 minutes ago  (HEAD -> feature/foo, origin/feature/foo)
  * 2ca69b7 32 minutes ago  (origin/feature/nuget, feature/nuget)
  * 2d3d51c 36 minutes ago  (origin/master, origin/HEAD, master)

C:\Users\appveyor\.nuget\packages\gitversion.msbuild\5.8.3\tools\GitVersion.MsBuild.targets(9,9): error MSB3073: The command ""C:\Users\appveyor\.nuget\packages\gitversion.msbuild\5.8.3\tools\net48/gitversion.exe" "C:\projects\gitversionbug\GitVersionBug" -output file -outputfile obj\gitversion.json" exited with code 1. [C:\projects\gitversionbug\GitVersionBug\GitVersionBug.csproj]
Command exited with code 1

Interestingly, the build of feature/foo by itself succeeded (https://ci.appveyor.com/project/ermshiperete/gitversionbug/builds/42813627), it's only building the merged branch that fails (https://ci.appveyor.com/project/ermshiperete/gitversionbug/builds/42813634):

Screenshot from 2022-03-07 16-40-18

asbjornu commented 2 years ago

Since the build of feature/foo succeeds and the merge-commit of it fails, perhaps the issue is that the merge-commit is identified as feature/foo and in the confusion, GitVersion tries to normalize feature/foo to point to the merge-commit and then goes belly up because it points to a different commit than origin/feature/foo?

What happens if you set IGNORE_NORMALISATION_GIT_HEAD_MOVE to 1?

ermshiperete commented 2 years ago

What happens if you set IGNORE_NORMALISATION_GIT_HEAD_MOVE to 1?

That works (https://ci.appveyor.com/project/ermshiperete/gitversionbug/builds/42828551) and is a workaround. But shouldn't this happen automatically on AppVeyor?

asbjornu commented 2 years ago

I'm not sure why this head move is happening in merge-commits of pull reuqests in AppVeyor and not in GitHub Actions. 🤔

ermshiperete commented 2 years ago

I'm not sure how GHA does things - haven't used it much, but with AppVeyor I notice that it uses a detached head in the failing builds:

git clone -q https://github.com/ermshiperete/GitVersionBug.git C:\projects\gitversionbug
git fetch -q origin +refs/pull/1/merge:
git checkout -qf FETCH_HEAD

whereas in the non-merge PR builds we usually end up in the branch (unless a force-push happened in the meantime in which case I guess the build would also fail):

git clone -q --branch=feature/foo https://github.com/ermshiperete/GitVersionBug.git C:\projects\gitversionbug
git checkout -qf fd3b7b84c8e99d63414854eecea9e48dc573331e
asbjornu commented 2 years ago

Can you adjust how AppVeyor creates the merge commit? A theory may be that GHA commits the merge to the target branch, while AppVeyor just keeps it dangling as a detached head.

ermshiperete commented 2 years ago

A theory may be that GHA commits the merge to the target branch, while AppVeyor just keeps it dangling as a detached head.

Yes, that's very likely.

Can you adjust how AppVeyor creates the merge commit?

I don't think that can be adjusted - at least I don't see anything anywhere :disappointed:

asbjornu commented 2 years ago

This problem is being discussed in https://github.com/appveyor/ci/issues/2418 and by the looks of #1666, seems to have existed for quite a while.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity. Thank you for your contributions