Skip to content

Commit

Permalink
git-artifacts: force-rebuilding the v2.48.0-rc1 package
Browse files Browse the repository at this point in the history
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:
git-for-windows/git#5337 (comment)

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 <[email protected]>
  • Loading branch information
dscho committed Dec 31, 2024
1 parent 54ade7d commit 6224fe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/git-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}" &&
Expand Down

0 comments on commit 6224fe2

Please sign in to comment.