Skip to content

Commit 586cf90

Browse files
committed
Show details on ARM Git for Windows before and after upgrade
The version of Git for Windows after the upgrade (or without the upgrade, if it is not done) is already shown in `actions/checkout` output, since that action defaults to using the installed Git. However, it's valuable to see information about it before and after upgrade in the same run. It's also useful to see more details than the version, such as to confirm the assumption that it is really an ARM64 build. All the information of interest could be obtained by running `git version --build-options`. But the change here continues to avoid running the old Git for any reason. This instead downlods and installs `sigcheck` to inspect a (non-shim) `git.exe`. This is with the idea that running any executables provided with Git for Windows may increase the likelihood of being unable to replace them, if somehow they or their subprocesses do not fully terminate. This is probably the wrong tradeoff, and it will probably be changed to running `git version --build-options` before and after the upgrade. But if that forthcoming change does cause a problem, then it can be reverted and the approach done here used again.
1 parent e6c4560 commit 586cf90

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,22 @@ jobs:
270270
env:
271271
GH_TOKEN: ${{ github.token }}
272272
run: |
273-
$workingDir = '~/git-dl'
273+
# Software downloaded in this step will be placed, and run from, here.
274+
$workingDir = '~/dl'
275+
mkdir $workingDir | Out-Null
276+
cd $workingDir
277+
278+
# We use Sysinternals Sigcheck to show information about the installed Git for Windows
279+
# before and after upgrade. (We are not actually using it to check any signatures.)
280+
curl -LO 'https://live.sysinternals.com/sigcheck64.exe'
281+
Write-Output 'BEFORE upgrading Git for Windows:'
282+
.\sigcheck64.exe -accepteula -nobanner 'C:\Program Files\Git\clangarm64\bin\git.exe'
283+
284+
# Configuration for which Git for Windows installer to download and how to run it. See
285+
# https://jrsoftware.org/ishelp/index.php?topic=setupcmdline on the Inno Setup arguments.
274286
$repo = 'git-for-windows/git'
275287
$pattern = 'Git-*-arm64.exe'
276288
$log = 'setup-log.txt'
277-
# Inno Setup args reference: https://jrsoftware.org/ishelp/index.php?topic=setupcmdline
278289
$arguments = @(
279290
'/VERYSILENT',
280291
'/SUPPRESSMSGBOXES',
@@ -285,13 +296,16 @@ jobs:
285296
'/FORCECLOSEAPPLICATIONS'
286297
)
287298
288-
mkdir $workingDir | Out-Null
289-
cd $workingDir
299+
# Download the Git for Windows release from GitHub and run the Inno Setup installer.
290300
gh release download --repo $repo --pattern $pattern
291301
$installer = Get-Item $pattern
292302
Start-Process -FilePath $installer -ArgumentList $arguments -NoNewWindow -Wait
293303
304+
# Report the effect of the upgrade.
305+
Write-Output 'Tail of the upgrade log:'
294306
Get-Content -Path $log -Tail 50
307+
Write-Output 'AFTER upgrading Git for Windows:'
308+
.\sigcheck64.exe -nobanner 'C:\Program Files\Git\clangarm64\bin\git.exe'
295309
git version
296310
- uses: actions/checkout@v4
297311
- name: Install rustup

0 commit comments

Comments
 (0)