From 8bf82833f0a872d9f490ee669bb207f85ffd625f Mon Sep 17 00:00:00 2001 From: Mike Mueller Date: Mon, 4 May 2026 21:31:08 +0200 Subject: [PATCH] ci(windows): self-heal missing flutter/windows before build --- .gitea/workflows/build-windows.yml | 44 ++++++++++++++++++------------ 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/build-windows.yml b/.gitea/workflows/build-windows.yml index 51cf3009d..0042cf6e2 100644 --- a/.gitea/workflows/build-windows.yml +++ b/.gitea/workflows/build-windows.yml @@ -183,24 +183,34 @@ jobs: exit 1 fi - - name: Diagnose flutter/ contents before build - shell: pwsh + - name: Diagnose + restore flutter/windows if missing + shell: bash run: | - Write-Host "== pwd ==" - Get-Location - Write-Host "`n== flutter/ ==" ; Get-ChildItem .\flutter -Force | Select-Object Mode,Length,Name - if (Test-Path .\flutter\windows) { - Write-Host "`n== flutter/windows/ ==" - Get-ChildItem .\flutter\windows -Recurse -Force | Select-Object FullName, Length - } else { - Write-Host "`n!! flutter/windows DOES NOT EXIST !!" - } - Write-Host "`n== git ls-files flutter/windows ==" - git ls-files flutter/windows | Measure-Object -Line - Write-Host "`n== git status (porcelain) ==" - git status --porcelain | Select-Object -First 30 - Write-Host "`n== flutter doctor ==" - flutter doctor -v + echo "== pwd ==" + pwd + echo + echo "== flutter/ (top level) ==" + ls -la flutter/ 2>/dev/null || echo "flutter/ missing" + echo + if [ -d flutter/windows ]; then + echo "== flutter/windows/ exists, file count ==" + find flutter/windows -type f | wc -l + ls -la flutter/windows/ + else + echo "!! flutter/windows MISSING !!" + echo "git status (filtered to flutter/windows):" + git status --porcelain | grep -E "flutter/windows" | head -30 || echo "(no entries)" + echo + echo "Restoring flutter/windows from git index..." + git checkout HEAD -- flutter/windows + if [ -d flutter/windows ]; then + echo "Restored: $(find flutter/windows -type f | wc -l) files" + else + echo "RESTORE FAILED -- check git ls-files:" + git ls-files flutter/windows | head + exit 1 + fi + fi - name: Build RustDesk (build.py --portable --hwcodec --flutter --vram) shell: pwsh