diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 95c6fd8..acd4fd3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,19 +39,6 @@ variables:
#cd "$env:APP_NAME\bin\publish\net6.0"
-# # helper creazione hash files x EXE
-# .hashBuildExe: &hashBuildExe
-# - |
-# $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
-# $MD5 = Get-FileHash $Target -Algorithm MD5
-# $SHA1 = Get-FileHash $Target -Algorithm SHA1
-# New-Item $Target".md5"
-# New-Item $Target".sha1"
-# $MD5.Hash | Set-Content -Path $Target".md5"
-# $SHA1.Hash | Set-Content -Path $Target".sha1"
-
-# echo "Created HASH files for $Target"
-
# helper creazione hash files x IIS
.hashBuild: &hashBuild
- |
@@ -110,6 +97,32 @@ variables:
Write-Output $resoconto;
echo "Replace completati"
+# helper x fix nuspec file
+.nuspec-fix: &nuspec-fix
+ - |
+ echo "Modifica dati file nuspec Release"
+ $currRelease = $env:NUM_REL
+ $currDebug = $env:NUM_DEB
+ $find = "(.|\n)*?";
+ $fileNameRel = "$env:APP_NAME.Release.nuspec";
+ $replRel = "" + $currRelease + "";
+ $nuspDataRel = Get-Content $fileNameRel;
+ $nuspDataRelUpd = $nuspDataRel -replace $find, $replRel;
+ $nuspDataRelUpd = $nuspDataRelUpd -replace "#copyright#", $replCopy;
+ $nuspDataRelUpd = $nuspDataRelUpd -replace "#releaseNotes#", "Build $adesso";
+ Set-Content -Path $fileNameRel -Value $nuspDataRelUpd;
+ echo "Modifica dati file nuspec Debug"
+ $fileNameDeb = "$env:APP_NAME.Debug.nuspec";
+ $replDeb = "" + $currDebug + "";
+ $nuspDataDeb = Get-Content $fileNameDeb;
+ $nuspDataDebUpd = $nuspDataDeb -replace $find, $replDeb;
+ $nuspDataDebUpd = $nuspDataDebUpd -replace "#copyright#", $replCopy;
+ $nuspDataDebUpd = $nuspDataDebUpd -replace "#releaseNotes#", "Build $adesso";
+ Set-Content -Path $fileNameDeb -Value $nuspDataDebUpd;
+ echo "replace completati"
+
+
+
stages:
- build
- deploy