Fix Git for Windows checksum update for rebuild (.windows.N) releases

What

update-checksums.sh and Dockerfile.windows assumed the MinGit asset filename always matches MinGit-<version>-<arch>.zip. That only holds for the first build of a Git for Windows release. Rebuilds append the build number to the filename:

Tag Asset filename
v2.55.0.windows.1 MinGit-2.55.0-64-bit.zip
v2.55.0.windows.2 MinGit-2.55.0.2-64-bit.zip

As a result, the checksum grep found nothing for .windows.2, the script exited with an empty checksum, and Renovate reported it as an "Artifact update problem" (see !148 (merged)). Even if the checksum were supplied, the ADD URL in Dockerfile.windows would have 404'd on the rebuild release.

Change

  • Compute GIT_FILE_VERSION (version, plus .build when the build is not 1) and use it for both checksum extraction and the download URL.
  • Add a GIT_FILE_VERSION build arg maintained by the script alongside GIT_VERSION.

Testing

  • Ran GIT_FOR_WINDOWS_TAG=v2.55.0.windows.2 ./scripts/update-checksums.sh: correctly extracts e3ea2944… (amd64) / 0b2b81fd… (arm64), matching the release notes.
  • Verified the resulting URL https://github.com/git-for-windows/git/releases/download/v2.55.0.windows.2/MinGit-2.55.0.2-64-bit.zip returns HTTP 200.
  • shellcheck clean.

Once merged, !148 (merged) can be rebased/retried and the artifact update will succeed.

🤖 Generated with Claude Code

Merge request reports

Loading
Loading