b83dafde2c
- fix missing dir IOB-MAN - fix kill TailBlazer in update
111 lines
4.0 KiB
YAML
111 lines
4.0 KiB
YAML
variables:
|
|
VERS_MAIN: '1.0'
|
|
NEXUS_PATH: 'LiMan'
|
|
APP_NAME: 'LiMan.UI'
|
|
SOL_NAME: 'LiMan.UI'
|
|
NUGET_PATH: 'C:\Tools\nuget.exe'
|
|
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
|
|
SRC_ZIP_PATH: 'bin\publish\net6.0'
|
|
NET_SHARE_Z: '\\172.16.0.214\install.egalware.com\'
|
|
NET_USERZ: 'steamwovh\gitlab'
|
|
|
|
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
|
|
.nuget-fix: &nuget-fix
|
|
- |
|
|
echo "esecuzione Nuget FIX steps"
|
|
dotnet nuget list source
|
|
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy"
|
|
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
|
dotnet nuget remove source "Steamware Nexus Proxy"
|
|
}
|
|
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus"
|
|
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
|
dotnet nuget remove source "Steamware Nexus"
|
|
}
|
|
$hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3"
|
|
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
|
dotnet nuget remove source nexus-proxy-v3
|
|
}
|
|
dotnet nuget add source https://nexus.steamware.net/repository/nuget-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
|
|
echo "Steamware Nexus Source added, final state:"
|
|
dotnet nuget list source
|
|
|
|
# helper x fix version number
|
|
.version-fix: &version-fix
|
|
- |
|
|
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format ddHH)
|
|
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format dHH)
|
|
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date -format yyMM)+"-beta."+(get-date -format dHH)
|
|
$env:NEW_COPYRIGHT = "EgalWare @ 2021-" + (get-date -format yyyy)
|
|
#$contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw
|
|
#$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
|
|
#$newContenuto = $newContenuto -replace 'EgalWare © 2021', $env:NEW_COPYRIGHT
|
|
#$newContenuto | Set-Content -Path 'VersGen\VersGen.cs'
|
|
# display versioni generate
|
|
$resoconto = "Effettuato fix file VersGen | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
|
|
Write-Output $resoconto;
|
|
echo "Replace completati"
|
|
|
|
# helper copia script verso cartella di rete S:\ delle cartelle bin
|
|
.ReplicaZ: &ReplicaZ
|
|
- |
|
|
$driveLetter = "Z"
|
|
if (Get-PSDrive -Name $driveLetter -ErrorAction SilentlyContinue)
|
|
{
|
|
net use Z: /delete
|
|
SLEEP 2
|
|
}
|
|
net use Z: $env:NET_SHARE_z /u:$env:NET_USERZ $ZDRIVE_IISOVH_PASSWD
|
|
ROBOCOPY $env:APP_NAME\bin\publish Z:\AppControlCenter\ /L
|
|
SLEEP 2
|
|
net use Z: /delete
|
|
|
|
stages:
|
|
- build
|
|
- deploy
|
|
|
|
# --------------------------------
|
|
# BUILD
|
|
# --------------------------------
|
|
|
|
EgwControlCenter:build:
|
|
stage: build
|
|
tags:
|
|
- win
|
|
variables:
|
|
SOL_NAME: EgwControlCenter
|
|
APP_NAME: EgwControlCenter.App
|
|
before_script:
|
|
- *nuget-fix
|
|
- dotnet restore "$env:SOL_NAME.sln"
|
|
script:
|
|
- echo $CI_COMMIT_BRANCH
|
|
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
|
|
|
# --------------------------------
|
|
# DEPLOY
|
|
# --------------------------------
|
|
EgwControlCenter:deploy:
|
|
stage: deploy
|
|
needs: ["EgwControlCenter:build"]
|
|
tags:
|
|
- win
|
|
only:
|
|
- main
|
|
- develop
|
|
variables:
|
|
SOL_NAME: EgwControlCenter
|
|
APP_NAME: EgwControlCenter.App
|
|
before_script:
|
|
- *nuget-fix
|
|
# - dotnet restore "$env:APP_NAME/$env:APP_NAME.csproj"
|
|
#- '& "$env:NUGET_PATH" restore "$env:SOL_NAME.sln" -verbosity quiet'
|
|
script:
|
|
- $env:DOTNET_NUGET_SIGNATURE_VERIFICATION = 'false'
|
|
- dotnet restore "$env:SOL_NAME.sln" --no-cache
|
|
#- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
|
# - dotnet restore EgwControlCenter.sln
|
|
- '& "$env:MSBUILD_PATH" -t:publish -p:PublishProfile=ClickOnceProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj'
|
|
after_script:
|
|
- *ReplicaZ
|