change wget and curl to retry functions

This commit is contained in:
Mikhail Timofeev
2020-10-27 09:45:22 +03:00
parent 48e266a55a
commit 592fcf2f66
9 changed files with 64 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
# Xamarin can clean their SDKs while updating to newer versions,
# so we should be able to detect it during image generation
downloadAndInstallPKG() {
@@ -175,7 +177,7 @@ downloadNUnitConsole() {
pushd $TMPMOUNT
sudo mkdir -p $NUNIT3_PATH
sudo curl -L -o nunit3.zip $NUNIT3_LOCATION
sudo download_with_retries $NUNIT3_LOCATION "." "nunit3.zip"
echo "Installing NUnit 3..."
sudo unzip nunit3.zip -d $NUNIT3_PATH
@@ -191,7 +193,7 @@ installNuget() {
echo "Installing nuget $NUGET_VERSION for Mono $MONO_VERSION"
cd ${MONO_VERSIONS_PATH}/${MONO_VERSION}/lib/mono/nuget
sudo mv nuget.exe nuget_old.exe
sudo curl -L -o nuget.exe $NUGET_URL
sudo download_with_retries $NUGET_URL "." "nuget.exe"
sudo chmod a+x nuget.exe
}