diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index 8b86ea8..87fdea0 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -4,6 +4,10 @@ net8.0 enable enable + 2.7.9.1217 + Annamaria Sassi + Egalware + Componente gestione Configurazioni avanzate Window per LUX @@ -17,5 +21,9 @@ + + + + diff --git a/WebWindowComplex/post-build.ps1 b/WebWindowComplex/post-build.ps1 new file mode 100644 index 0000000..0015dbe --- /dev/null +++ b/WebWindowComplex/post-build.ps1 @@ -0,0 +1,24 @@ +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).Month; +$Build = get-date -format dHH; +$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 = "" + $newVers + ""; +$newContent = $fileContent -replace $findVers, $replVers; +Set-Content -Path $ProjectPath -Value $newContent; +echo "Modifica dati file progetto x nuspec completata su file $ProjectPath" +