From efdf1c89b83bf435810edeb981b5982e2aef2288 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 29 Mar 2021 11:12:31 +0200 Subject: [PATCH] update fix version number --- .gitlab-ci.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 871a227..b5458e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,12 +37,11 @@ variables: C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source http://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" } echo $hasSource - # path alla solution corrente - - '& "$env:NUGET_PATH" restore GPW.sln' -# .versNumbFix: &versNumbFix -# - 'echo "Set vers: $env:VERS_NUMBER"' -# - '& ((Get-Content -path VersGen\\GPW.cs -Raw) -replace '0.0.0.0','$env:VERS_NUMBER') | Set-Content -Path VersGen\\GPW.cs?' +# helper x fix version number +.version-fix: &version-fix + - 'echo "Set vers: $env:VERS_NUMBER"' + - '& ((Get-Content -path VersGen\\GPW.cs -Raw) -replace '0.0.0.0','$env:VERS_NUMBER') | Set-Content -Path VersGen\\GPW.cs?' stages: - build @@ -51,7 +50,10 @@ stages: admin:build: stage: build before_script: - - *nuget-fix + - *nuget-fix + # path alla solution corrente + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix script: - '& "$env:MSBUILD_PATH" GPW_Admin/GPW_Admin.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /m' # artifacts: @@ -66,7 +68,9 @@ admin:build: bcode:build: stage: build before_script: - - *nuget-fix + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix script: - '& "$env:MSBUILD_PATH" GPW_Barcode/GPW_Barcode.csproj -target:Build /p:Configuration=Release /p:Platform="Any CPU" /p:OutputPath=bin/ /m' @@ -101,7 +105,9 @@ admin:deploy: # only: # - tags # the build process will only be started by git tag commits before_script: - - *nuget-fix + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix script: - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ GPW_Admin/GPW_Admin.csproj' needs: ["admin:build"] @@ -112,7 +118,9 @@ admin:deploy: bcode:deploy: stage: deploy before_script: - - *nuget-fix + - *nuget-fix + - '& "$env:NUGET_PATH" restore GPW.sln' + - *version-fix script: - '& "$env:MSBUILD_PATH" /p:m=4 /p:AspnetMergePath=$env:ASPNET_MERGE_PATH /p:DeployOnBuild=true /p:Targets=Publish /p:PublishProfile=IIS01.pubxml /p:RunCodeAnalysis=false /p:Configuration=IIS01 /p:username=jenkins /p:Password=viadante16 /p:AllowUntrustedCertificate=true /p:OutputPath=bin/ GPW_Barcode/GPW_Barcode.csproj' needs: ["bcode:build"]