Skip to content

Commit 923754f

Browse files
committed
Use Git 2.49.0 release candidate in test-fixtures-windows
This is to work around for GitoxideLabs#1849 while still running tests and fixture scripts that rely on the ability of `git` to rename symlinks on Windows.
1 parent d0ef276 commit 923754f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,34 @@ 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+
$arguments = @(
179+
'/VERYSILENT',
180+
'/SUPPRESSMSGBOXES',
181+
'/ALLUSERS',
182+
"/LOG=$log",
183+
'/NORESTART',
184+
'/CLOSEAPPLICATIONS',
185+
'/FORCECLOSEAPPLICATIONS'
186+
)
187+
188+
mkdir $workingDir | Out-Null
189+
cd $workingDir
190+
$latestTag = gh release list --repo $repo --limit 1 --json tagName --jq '.[0].tagName'
191+
gh release download $latestTag --repo $repo --pattern $pattern
192+
$installer = Get-Item $pattern
193+
Start-Process -FilePath $installer -ArgumentList $arguments -NoNewWindow -Wait
194+
Get-Content -Path $log -Tail 50
195+
git version
168196
- uses: actions/checkout@v4
169197
- uses: dtolnay/rust-toolchain@stable
170198
- uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)