From 6224fe2642e6e697356d0aaaf4e17aa63df63751 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 31 Dec 2024 10:38:29 +0100 Subject: [PATCH] git-artifacts: force-rebuilding the v2.48.0-rc1 package In the course of testing Git for Windows v2.48.0-rc1 before releasing the artifacts, I noticed a rather big regression in Git GUI/gitk: https://github.com/git-for-windows/git/pull/5337#issuecomment-2565973674 Essentially, they both complained about incompatible Git versions. The culprit is not in Git GUI nor in gitk, though, it is in Git's 992bc5618f2 (GIT-VERSION-GEN: fix overriding GIT_VERSION, 2024-12-20). As of that revision, Git's build will now respect the environment variable `GIT_VERSION` and use it verbatim. In Git for Windows' automation, we have defined that environment variable for ages, and it is not in the form that `git version` is supposed to be: The latter should output a version that does _not_ start with a `v` and does not include dashes either (replacing any `-` by `.` in the build process). This broke Git for Windows v2.48.0-rc1, and we have to adapt the automation. We did this in git-for-windows/MINGW-packages@56d5c67af (git: force-fully ignore the environment variable `GIT_VERSION`, 2024-12-31). To make this take effect in a rebuild of the Git for Windows artifacts, we have to ignore the previously-cached packages (where `git version` would still output `git version v2.48.0-rc1.windows.1` instead of the desired `git version 2.48.0.rc1.windows.1`). We do that by using a special cache key for that Git version. Signed-off-by: Johannes Schindelin --- .github/workflows/git-artifacts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/git-artifacts.yml b/.github/workflows/git-artifacts.yml index 2f403ff..840cff4 100644 --- a/.github/workflows/git-artifacts.yml +++ b/.github/workflows/git-artifacts.yml @@ -172,7 +172,7 @@ jobs: test "$ARCHITECTURE" != x86_64 || ARTIFACTS_TO_BUILD="$ARTIFACTS_TO_BUILD nuget" } echo "ARTIFACTS_TO_BUILD=$ARTIFACTS_TO_BUILD" >> $GITHUB_ENV - echo "PKG_CACHE_KEY=pkg-$GIT_VERSION-$ARCHITECTURE-$TAG_GIT_WORKFLOW_RUN_ID" >> $GITHUB_ENV + echo "PKG_CACHE_KEY=pkg-$GIT_VERSION$(test v2.48.0-rc1.windows.1 != "$GIT_VERSION" || echo "-try2")-$ARCHITECTURE-$TAG_GIT_WORKFLOW_RUN_ID" >> $GITHUB_ENV - name: Configure user run: USER_NAME="${{github.actor}}" &&