on ubuntu use the working 4.5.1 version of nuget

This commit is contained in:
Rui Lopes 2018-04-08 18:57:06 +01:00
parent 693fa93071
commit b81ccf4fe2
1 changed files with 5 additions and 1 deletions

View File

@ -15,13 +15,17 @@ if ! which mono; then
sudo apt-get install -y mono-complete sudo apt-get install -y mono-complete
fi fi
if [[ ! -f /tmp/nuget.exe ]]; then if [[ ! -f /tmp/nuget.exe ]]; then
wget -qO/tmp/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe # NB ubuntu 16.04 mono cannot run nuget.exe versions above 4.5.1.
# see https://github.com/NuGet/Home/issues/6790
wget -qO/tmp/nuget.exe https://dist.nuget.org/win-x86-commandline/v4.5.1/nuget.exe
fi fi
function nuget { function nuget {
mono /tmp/nuget.exe $* mono /tmp/nuget.exe $*
} }
nuget | grep -i version:
nuget_source_url=https://$nexus_domain/repository/nuget-group/ nuget_source_url=https://$nexus_domain/repository/nuget-group/
nuget_source_push_url=https://$nexus_domain/repository/nuget-hosted/ nuget_source_push_url=https://$nexus_domain/repository/nuget-hosted/
nuget_source_push_api_key=$(nexus-groovy get-jenkins-nuget-api-key | jq -r '.result | fromjson | .apiKey') nuget_source_push_api_key=$(nexus-groovy get-jenkins-nuget-api-key | jq -r '.result | fromjson | .apiKey')