From cc50a8bbc8133ddb543b26bdc857604c7ef74c3e Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 16 Aug 2026 13:39:53 +0100 Subject: [PATCH] ci: unshallow clone for GitVersion GitVersion.MsBuild fails on shallow clones ('Repository is a shallow clone. Git repositories must contain the full history.') because it walks the git log to compute the SemVer version. Drop --depth 1 from both the PR ref fetch and the submodule update so the runner's working tree has full history. The repo is small enough that the cost is negligible. --- .forgejo/workflows/buildAndTest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/buildAndTest.yml b/.forgejo/workflows/buildAndTest.yml index 2c0137bd..9b3403db 100644 --- a/.forgejo/workflows/buildAndTest.yml +++ b/.forgejo/workflows/buildAndTest.yml @@ -46,10 +46,10 @@ jobs: git clone https://forgejo.pschneider.fr/notazof/yavsc.git _src cd _src if [ -n "${GITHUB_REF:-}" ]; then - git fetch --depth 1 origin "$GITHUB_REF" + git fetch origin "$GITHUB_REF" git checkout FETCH_HEAD fi - git submodule update --init --recursive --depth 1 + git submodule update --init --recursive echo "Checked out at $(git rev-parse HEAD) on $(git branch --show-current 2>/dev/null || echo detached HEAD)" - name: Restore dependencies run: cd /src/_src && dotnet restore