From faba3fbe6049b460c01c00b86e95ea64999a08a4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 22 Sep 2021 12:06:03 +0200 Subject: [PATCH] Fix deploy script x vers number unificato --- .gitlab-ci.yml | 2 -- MP.Prog/post-build.ps1 | 15 ++++++++------- MP.Stats/post-build.ps1 | 15 ++++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 15e81b2e..b8c465da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,6 @@ variables: ASPNET_MERGE_PATH: 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools' EXE_RELEASE_FOLDER: 'c:\Projetcs\Compiled\MP-CORE\Release' DEPLOY_FOLDER: 'c:\Projects\Deploy\MP-CORE\Builds' - VERS_MAIN: '1.1' -# VERS_FULL: '0.0.0.0' NEXUS_PATH: 'MP-STATS' APP_NAME: 'MP.Stats' diff --git a/MP.Prog/post-build.ps1 b/MP.Prog/post-build.ps1 index bc301c2a..7b829f79 100644 --- a/MP.Prog/post-build.ps1 +++ b/MP.Prog/post-build.ps1 @@ -1,15 +1,16 @@ param([string]$ProjectDir, [string]$ProjectPath); -$FileVers="Resources\VersNum.txt" -$FileManIn="Resources\manifest-original.xml" -$FileManOut="Resources\manifest.xml" -$FileCLogIn="Resources\ChangeLog-original.html" -$FileCLogOut="Resources\ChangeLog.html" -$MajMin="1.1." +$FileMajMin = "..\MajMin.vers" +$FileVers = "Resources\VersNum.txt" +$FileManIn = "Resources\manifest-original.xml" +$FileManOut = "Resources\manifest.xml" +$FileCLogIn = "Resources\ChangeLog-original.html" +$FileCLogOut = "Resources\ChangeLog.html" +$MajMin = Get-Content $FileMajMin # "6.14." $currentDate = get-date -format yyMM; $currentTime = get-date -format ddHH; $find = "(.|\n)*?"; -$currRelNum=$MajMin + $currentDate +"." + $currentTime +$currRelNum = $MajMin + $currentDate +"." + $currentTime $replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; $csproj = Get-Content $ProjectPath $csprojUpdated = $csproj -replace $find, $replace diff --git a/MP.Stats/post-build.ps1 b/MP.Stats/post-build.ps1 index 063f4945..931766a0 100644 --- a/MP.Stats/post-build.ps1 +++ b/MP.Stats/post-build.ps1 @@ -1,15 +1,16 @@ param([string]$ProjectDir, [string]$ProjectPath); -$FileVers="Resources\VersNum.txt" -$FileManIn="Resources\manifest-original.xml" -$FileManOut="Resources\manifest.xml" -$FileCLogIn="Resources\ChangeLog-original.html" -$FileCLogOut="Resources\ChangeLog.html" -$MajMin="1.1." +$FileMajMin = "..\MajMin.vers" +$FileVers = "Resources\VersNum.txt" +$FileManIn = "Resources\manifest-original.xml" +$FileManOut = "Resources\manifest.xml" +$FileCLogIn = "Resources\ChangeLog-original.html" +$FileCLogOut = "Resources\ChangeLog.html" +$MajMin = Get-Content $FileMajMin # "6.14." $currentDate = get-date -format yyMM; $currentTime = get-date -format ddHH; $find = "(.|\n)*?"; -$currRelNum=$MajMin + $currentDate +"." + $currentTime +$currRelNum = $MajMin + $currentDate +"." + $currentTime $replace = "" + $MajMin + $currentDate +"." + $currentTime + ""; $csproj = Get-Content $ProjectPath $csprojUpdated = $csproj -replace $find, $replace