From 5738920c9ccae2720b9ac04cc69728a2d50bf68b Mon Sep 17 00:00:00 2001 From: "Adriano (daitarn)" Date: Fri, 6 Nov 2026 12:07:23 +0100 Subject: [PATCH] sviluppo.ps1: git solo con submodule inizializzato; comando di test corretto (#109) Co-Authored-By: Claude Sonnet 5.5 --- packaging/windows/sviluppo.ps1 | 3 ++- scripts/tests/test_archivio_sorgente.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/windows/sviluppo.ps1 b/packaging/windows/sviluppo.ps1 index 9e578c1..d809698 100644 --- a/packaging/windows/sviluppo.ps1 +++ b/packaging/windows/sviluppo.ps1 @@ -52,7 +52,8 @@ $env:WEASYPRINT_DLL_DIRECTORIES = $gtk # \vision-engine-version.txt (come nel pacchetto, build.ps1). Da sorgente lo scrive questo script. $versione = Join-Path $radice 'vision-engine-version.txt' $shaMotore = $null -if (Get-Command git -ErrorAction SilentlyContinue) { +# #109: solo se il submodule e' inizializzato (ha .git): altrimenti git risale al repo padre e darebbe lo sha di TMF +if ((Get-Command git -ErrorAction SilentlyContinue) -and (Test-Path (Join-Path $radice 'vendor\visionsuite\.git'))) { $shaMotore = (git -C (Join-Path $radice 'vendor\visionsuite') rev-parse HEAD 2>$null) if ($LASTEXITCODE -ne 0) { $shaMotore = $null } } diff --git a/scripts/tests/test_archivio_sorgente.py b/scripts/tests/test_archivio_sorgente.py index 6925781..263abb4 100644 --- a/scripts/tests/test_archivio_sorgente.py +++ b/scripts/tests/test_archivio_sorgente.py @@ -1,6 +1,6 @@ """Test di scripts/archivio_sorgente.py (TieMeasureFlow#109): repo temporaneo con un submodule finto. -Uso: uv run --python 3.13 --extra dev pytest -q scripts/tests/test_archivio_sorgente.py +Uso: uv run --no-project --python 3.13 --with pytest pytest -q scripts/tests/test_archivio_sorgente.py """ import importlib.util import subprocess