diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index df7d59b..a4c0ba3 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -1,29 +1,35 @@ - + - - net8.0 - enable - enable - + + net8.0 + enable + enable + 2.7.8.0717 + Annamaria Sassi + Egalware + Componente gestione JWD per LUX + - - - + + + - - - + + + - - - - - - - - - - + + + + + + + + + + + + diff --git a/WebWindowConfigurator/post-build.ps1 b/WebWindowConfigurator/post-build.ps1 new file mode 100644 index 0000000..e833db0 --- /dev/null +++ b/WebWindowConfigurator/post-build.ps1 @@ -0,0 +1,21 @@ +param([string]$ProjectPath); + + +# Gestione calcolata numero Versione del componente: Major/Minor da gestire a mano, Rel e Build ricalcolate in compilazione + +echo "Modifica dati versione pacchetto nuget" +$fileContent = Get-Content $ProjectPath -Raw; +$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; +$Build = get-date -format ddHH; +$newVers = $vers -replace '^(\d+)\.(\d+)\.(\d+)\.(\d+)$', '$1.$2.$Release.$Build' +echo "Versione calcolata: $newVers" +$findVers = "(.|\n)*?"; +$replVers = "" + $env:NUM_REL + ""; +$newContent = $fileContent -replace $findVers, $replVers; +Set-Content -Path $ProjectPath -Value $newContent; +echo "Modifica dati file progetto x nuspec completata su file $ProjectPath" +