diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19e4f3db..fb23fe63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,39 @@ variables: NEXUS_PATH: 'MP-STATS' APP_NAME: 'MP.Stats' +# # helper x fix version number +# .version-fix: &version-fix +# - | +# $env:NEW_REL = $env:VERS_MAIN+"."+(get-date –format yyMM)+"."+$CI_PIPELINE_IID +# echo "Set vers: $env:NEW_REL" +# $contenuto = Get-Content -path 'VersGen\GPW.cs' -Raw +# $newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL +# $newContenuto | Set-Content -Path 'VersGen\GPW.cs' + +# helper pulizia files zip +.cleanup-zip: &cleanup-zip + - | + $env:OUTPUT_DIR = $env:APP_NAME + "\bin\Release\*.zip" + if ((Test-Path $env:OUTPUT_DIR)) + { + Remove-Item $env:OUTPUT_DIR -Force -Recurse -ErrorAction Ignore + } + echo "Clening ZIP dir: $env:OUTPUT_DIR" + +# helper creazione files zip +.zipper: &zipper + - | + $7zipPath = $env:ProgramFiles+"\7-Zip\7z.exe" + if (-not (Test-Path -Path $7zipPath -PathType Leaf)) { + throw "7 zip file '$7zipPath' not found" + } + Set-Alias 7zip $7zipPath + $Target = $env:APP_NAME + "\bin\Release\" + $env:APP_NAME + ".zip" + $Source = $env:APP_NAME + "\bin\Release\*" + 7zip a -tzip $Target $Source + echo "called ZIP $Source --> $Target" + + # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix - | @@ -20,7 +53,20 @@ variables: } echo $hasSource -# helper creazione hash files +# helper creazione hash files x CORE +.hashBuildCore: &hashBuildCore + - | + $Target = $env:APP_NAME + "\bin\Release\" + $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 - | $Target = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip" @@ -31,10 +77,32 @@ variables: $MD5.Hash | Set-Content -Path $Target".md5" $SHA1.Hash | Set-Content -Path $Target".sha1" - echo "Created HASH files for $Target" + echo "Created HASH files for $Target" -# helper x send su NEXUS -.nexusUpload: &nexusUpload +# helper x send su NEXUS CORE +.nexusUploadCore: &nexusUploadCore + - | + Set-Alias mCurl C:\Windows\system32\curl.exe + $currentDate = get-date -format yyMM; + $currentTime = get-date -format ddHH; + $VersNumb = Get-Content "Resources\VersNum.txt" + echo "Curr Version: $VersNumb" + if($CI_COMMIT_BRANCH -eq "master") + { + $version = "stable" + } + else + { + $version = "unstable" + } + $File2Send = Get-ChildItem($env:APP_NAME + "\bin\Release\*.zip*") + ForEach ($File in $File2Send) { + $FileName = Split-Path $File -leaf + mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File http://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/SLS/$FileName + } + +# helper x send su NEXUS x pack +.nexusUploadIIS: &nexusUpload - | Set-Alias mCurl C:\Windows\system32\curl.exe $currentDate = get-date -format yyMM; @@ -109,6 +177,25 @@ staging: - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj - dotnet publish -p:PublishProfile=W2019-IIS-DEVProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true MP.Stats/MP.Stats.csproj +# staging: +# stage: installerCore +# only: +# - develop +# - master +# needs: ["build"] +# before_script: +# # - *nuget-fix +# # - dotnet restore +# # - '& "$env:NUGET_PATH" restore LPA.sln' # path alla solution corrente +# # - *version-fix +# - *cleanup-zip +# script: +# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Stats/MP.Stats.csproj +# # deploy su nexus... +# - *zipper +# - *hashBuildCore +# - *nexusUploadCore + staging: stage: installer only: @@ -118,13 +205,9 @@ staging: before_script: # - *nuget-fix # - dotnet restore - # - '& "$env:NUGET_PATH" restore LPA.sln' # path alla solution corrente - # - *version-fix - # - *cleanup-zip script: - - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Stats/MP.Stats.csproj - # da fare qui il deploy su nexus... - # - *zipper + - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release MP.Stats/MP.Stats.csproj -p:output "publish/net5.0" + # qui il deploy su nexus... - *hashBuild - *nexusUpload diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index cb1018df..ad113c8f 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -4,7 +4,7 @@ net5.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 - 1.0.2106.0319 + 1.0.2106.1716 diff --git a/MP.Stats/Pages/Diario.razor b/MP.Stats/Pages/Diario.razor index 101e1229..3c7877af 100644 --- a/MP.Stats/Pages/Diario.razor +++ b/MP.Stats/Pages/Diario.razor @@ -46,7 +46,7 @@ @record.IdxOdl | @record.KeyRichiesta @record.CodArticolo @record.Descrizione - @record.DurataMin + @record.DurataPeriodo @record.TotPzProd } diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index c890aa19..93eae0d7 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

Versione: 1.0.2106.0319

+

Versione: 1.0.2106.1716


Note di rilascio: