From 84c5cda6683d763587ac2db0445b2e6decf66db7 Mon Sep 17 00:00:00 2001 From: foxyz Date: Sat, 10 Oct 2026 00:41:17 +0300 Subject: [PATCH] CI (Windows): fetch git dependencies fresh; the host's cached fox_utils clone was stale Co-Authored-By: Claude Opus 5.5 --- tool/package_windows.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tool/package_windows.ps1 b/tool/package_windows.ps1 index dae213b..c05ef56 100644 --- a/tool/package_windows.ps1 +++ b/tool/package_windows.ps1 @@ -25,6 +25,18 @@ function Invoke-Checked([string]$What, [scriptblock]$Cmd) { } if (-not $SkipBuild) { + # The host runner keeps the pub cache between jobs; its clone of a git + # dependency (fox_utils) went stale ("some refs were not updated") and + # resolved the wrong revision. Git deps are tiny: always fetch them fresh. + $PubCache = if ($env:PUB_CACHE) { $env:PUB_CACHE } else { Join-Path $env:LOCALAPPDATA 'Pub\Cache' } + foreach ($d in @((Join-Path $PubCache 'git'), (Join-Path $PubCache 'git\cache'))) { + Get-ChildItem -Path $d -Directory -Filter 'fox_utils*' -ErrorAction SilentlyContinue | + Remove-Item -Recurse -Force -ErrorAction SilentlyContinue + } + Push-Location $App + try { + Invoke-Checked 'flutter pub get' { flutter pub get } + } finally { Pop-Location } Push-Location $App try { flutter build windows --release "--dart-define=APP_VERSION=$Version"