From b8aac067a98778623d447251fcad7d9cf0a7cf4d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 7 Aug 2025 19:07:12 +0200 Subject: [PATCH] Fix versione calcolata --- WebWindowConfigurator/WebWindowConfigurator.csproj | 12 ++++++++++-- WebWindowConfigurator/post-build.ps1 | 9 ++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index a4c0ba3..bc04c32 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -1,10 +1,10 @@ - + net8.0 enable enable - 2.7.8.0717 + 2.7.8.0719 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -33,3 +33,11 @@ + + + + + + + + diff --git a/WebWindowConfigurator/post-build.ps1 b/WebWindowConfigurator/post-build.ps1 index e833db0..bc77ab7 100644 --- a/WebWindowConfigurator/post-build.ps1 +++ b/WebWindowConfigurator/post-build.ps1 @@ -9,12 +9,15 @@ $pattern = '(?i)\s*(.*?)\s*' $vers = if ($fileContent -match $pattern) { $matches[1] } else { $null } echo "Versione corrente: $vers" # calcolo Rel e Build... -$Release = get-date -format M; +$Release = (Get-Date).Month; $Build = get-date -format ddHH; -$newVers = $vers -replace '^(\d+)\.(\d+)\.(\d+)\.(\d+)$', '$1.$2.$Release.$Build' +$parts = $vers -split '\.' +#$newVers = "$parts[0].$parts[1].$Release.$Build" +$newParts = @($parts[0], $parts[1], $Release, $Build) +$newVers = $newParts -join '.' echo "Versione calcolata: $newVers" $findVers = "(.|\n)*?"; -$replVers = "" + $env:NUM_REL + ""; +$replVers = "" + $newVers + ""; $newContent = $fileContent -replace $findVers, $replVers; Set-Content -Path $ProjectPath -Value $newContent; echo "Modifica dati file progetto x nuspec completata su file $ProjectPath"