From 813fc9dd385ca1ac0791f5bd61c10c889ea59577 Mon Sep 17 00:00:00 2001 From: Mark M2 Macbook Date: Fri, 22 May 2026 10:45:46 +0200 Subject: [PATCH] prova --- .gitea/workflows/release.yaml | 35 +++++++++++++++++++---------------- pubspec.yaml | 2 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 6510949..71418ea 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -11,33 +11,36 @@ jobs: - name: Checkout del codice uses: actions/checkout@v3 - # 1. Facciamo una build finta. Genererà i symlinks e poi fallirà per il bug, - # ma il 'continue-on-error' dirà a Gitea di ignorare l'errore e andare avanti. - - name: Pre-build per generare l'ambiente (Fallirà apposta) + # 1. Pre-build per generare i symlink (Fallirà apposta) + - name: Pre-build per generare l'ambiente continue-on-error: true run: flutter build windows --release - # 2. Ora la cartella ephemeral esiste! Applichiamo il fix e pialliamo la cache. - - name: Fix bug CMake di pdfx + # 2. Il Fix Definitivo con .NET + - name: Fix bug CMake di pdfx (Patcha la vera Pub Cache) run: | - $cmakeFile = "windows\flutter\ephemeral\.plugin_symlinks\pdfx\windows\DownloadProject.cmake" + $file = "windows\flutter\ephemeral\.plugin_symlinks\pdfx\windows\DownloadProject.cmake" - if (Test-Path $cmakeFile) { - # 1. Applichiamo il cerotto - (Get-Content $cmakeFile) -replace 'VERSION 2.8.2', 'VERSION 3.5' | Set-Content $cmakeFile - Write-Host "Il cerotto CMake è stato applicato con successo!" + if (Test-Path $file) { + # Usiamo [IO.File] del .NET Framework! + # Questo segue il symlink in modo trasparente e modifica il VERO file originale nella Pub Cache. + $text = [IO.File]::ReadAllText($file) + $text = $text.Replace("VERSION 2.8.2", "VERSION 3.5") + [IO.File]::WriteAllText($file, $text) - # 2. LA MAGIA: Pialliamo la cache di CMake generata dalla build fallita! - if (Test-Path "build\windows") { - Remove-Item -Recurse -Force "build\windows" - Write-Host "Cache CMake eliminata. Pronti per la build pulita." - } + Write-Host "Il VERO file nella Pub Cache è stato patchato in modo permanente!" } else { Write-Error "File non trovato. La pre-build non ha generato i symlink." exit 1 } - # 3. Ora che il file è corretto, la build vera arriverà fino in fondo + # Pialliamo la cache sporca di CMake del tentativo precedente + if (Test-Path "build\windows") { + Remove-Item -Recurse -Force "build\windows" + Write-Host "Cartella build sporca eliminata." + } + + # 3. Ora la build vera non può fallire, perché il sorgente di pdfx è stato curato alla radice - name: Build Flutter Definitiva env: CMAKE_BUILD_PARALLEL_LEVEL: 2 diff --git a/pubspec.yaml b/pubspec.yaml index 2d95e01..8eb0047 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: flux description: "Gestione attività negozio di telefonia" publish_to: 'none' -version: 1.0.8+8 +version: 1.0.9+9 environment: sdk: ^3.11.3