diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6845eea..b92616e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -106,6 +106,30 @@ variables:
Set-Content -Path $fileNameRel -Value $newContent;
echo "Modifica dati file progetto x nuspec completata su file $fileNameRel"
+# helper x fix nuspec file: se debug aggiunge -beta nel blocco 3 del SemVer
+.nuspec-fix-framework: &nuspec-fix-framework
+ - |
+ echo "Modifica dati versione pacchetto nuget x progetti Framework"
+ $fileNameRel = "$env:APP_NAME/$env:APP_NAME.nuspec";
+ $fileContent = Get-Content $fileNameRel -Raw;
+ $pattern = '(?i)\s*(.*?)\s*'
+ $vers = if ($fileContent -match $pattern) { $matches[1] } else { $null }
+ echo "Versione corrente: $vers"
+ if ($env:NU_TYPE -eq "Debug")
+ {
+ $env:NUM_REL = $vers -replace '^(\d+)\.(\d+)\.(\d+)\.(\d+)$', '$1.$2.$3-beta.$4'
+ }
+ elseif($env:NU_TYPE -eq "Release")
+ {
+ $env:NUM_REL = $vers
+ }
+ echo "Versione calcolata: $env:NUM_REL"
+ $findVers = "(.|\n)*?";
+ $replVers = "" + $env:NUM_REL + "";
+ $newContent = $fileContent -replace $findVers, $replVers;
+ Set-Content -Path $fileNameRel -Value $newContent;
+ echo "Modifica dati file progetto x nuspec completata su file $fileNameRel"
+
# Stages previsti
stages:
- build
@@ -200,7 +224,7 @@ EgwMultiEngineManager.Core:SDK:deploy:
- *nuget-fix
# - dotnet restore "$env:SOL_NAME.sln" --packages "c:\.nuget\packages"
- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln" -PackagesDirectory "c:\.nuget\packages"'
- - *nuspec-fix
+ - *nuspec-fix-framework
script:
# - dotnet build $env:APP_NAME/$env:APP_NAME.vbproj
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.vbproj" -target:Build /p:Configuration=Debug /verbosity:minimal /m'
diff --git a/EgwMultiEngineManager.Core.Debug.nuspec b/EgwMultiEngineManager.Core.Debug.nuspec
index 39062c2..c2e9a70 100644
--- a/EgwMultiEngineManager.Core.Debug.nuspec
+++ b/EgwMultiEngineManager.Core.Debug.nuspec
@@ -1,7 +1,7 @@
- 7b2a764c-f972-434c-9598-168218eac7b0
+ EgwMultiEngineManager.Core
2.7.9.5
EgwMultiEngineManager.Core
Emmanuele Sassi
diff --git a/EgwMultiEngineManager.Core.Release.nuspec b/EgwMultiEngineManager.Core.Release.nuspec
index 3cdbf74..431816d 100644
--- a/EgwMultiEngineManager.Core.Release.nuspec
+++ b/EgwMultiEngineManager.Core.Release.nuspec
@@ -1,7 +1,7 @@
- 7b2a764c-f972-434c-9598-168218eac7b0
+ EgwMultiEngineManager.Core
2.7.9.5
EgwMultiEngineManager.Core
Emmanuele Sassi