diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1aa1d0..6a9d9eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,19 +3,39 @@ variables: NEXUS_PATH: 'EQN' APP_NAME: 'Eqn.Sender' SOL_NAME: 'Eqn.Sender' - NUGET_PATH: 'C:\Tools\nuget.exe' - MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe' # helper x fix pacchetti nuget da repo locale nexus.steamware.net .nuget-fix: &nuget-fix - | - $hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C - if ($hasSource -eq 0) { - C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`"" - } else { - C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"$NEXUS_PASSWD`"" + 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`"" } - echo $hasSource + $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 + } + $hasSource = dotnet nuget list source | Select-String -Pattern "nexus-hosted" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source nexus-hosted + } + $hasSource = dotnet nuget list source | Select-String -Pattern "Microsoft Visual Studio Offline Packages" + if (! [String]::IsNullOrWhiteSpace($hasSource)) { + dotnet nuget remove source 'Microsoft Visual Studio Offline Packages' + } + echo "Situazione sorgenti post remove:" + dotnet nuget list source + dotnet nuget add source https://nexus.steamware.net/repository/nuget-proxy-v3/index.json -n nexus-proxy-v3 -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text + dotnet nuget add source https://nexus.steamware.net/repository/nuget-hosted/ -n nexus-hosted -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text + $hasSource = dotnet nuget list source + echo "Situazione sorgenti FINALE:" + dotnet nuget list source # helper creazione hash files .hashBuild: &hashBuild