Skip to content

Commit 9db941a

Browse files
committed
Use Git 2.49.0 release candidate in test-fixtures-windows
This is to work around #1849, while still running tests and fixture scripts that rely on Git being able to rename symlinks on Windows.
1 parent d0ef276 commit 9db941a

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/ci.yml

+29
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,35 @@ jobs:
165165
runs-on: windows-latest
166166

167167
steps:
168+
- name: Upgrade Git for Windows to latest (pre)release
169+
# This upgrades Git to work around https://github.com/GitoxideLabs/gitoxide/issues/1849.
170+
# TODO: Remove this step once the runner image has Git 2.49.0 or higher.
171+
env:
172+
GH_TOKEN: ${{ github.token }}
173+
run: |
174+
$workingDir = '~/git-dl'
175+
$repo = 'git-for-windows/git'
176+
$pattern = 'Git-*-64-bit.exe'
177+
$log = 'setup-log.txt'
178+
# Inno Setup args reference: https://jrsoftware.org/ishelp/index.php?topic=setupcmdline
179+
$arguments = @(
180+
'/VERYSILENT',
181+
'/SUPPRESSMSGBOXES',
182+
'/ALLUSERS',
183+
"/LOG=$log",
184+
'/NORESTART',
185+
'/CLOSEAPPLICATIONS',
186+
'/FORCECLOSEAPPLICATIONS'
187+
)
188+
189+
mkdir $workingDir | Out-Null
190+
cd $workingDir
191+
$newestTag = gh release list --repo $repo --limit 1 --json tagName --jq '.[0].tagName'
192+
gh release download $newestTag --repo $repo --pattern $pattern
193+
$installer = Get-Item $pattern
194+
Start-Process -FilePath $installer -ArgumentList $arguments -NoNewWindow -Wait
195+
Get-Content -Path $log -Tail 50
196+
git version
168197
- uses: actions/checkout@v4
169198
- uses: dtolnay/rust-toolchain@stable
170199
- uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)