[macOS] Fail builds on errors during the image generation (#1756)

* set -e and fix all the scripts

* add source utils to finalize_vm script

* change xcode version in postbuild script

* fix for softwareupdates and for xcode version
This commit is contained in:
Mikhail Timofeev
2020-10-23 17:59:08 +03:00
committed by GitHub
parent baad68926a
commit 0d46520ccf
54 changed files with 116 additions and 109 deletions

View File

@@ -1,11 +1,11 @@
#!/bin/sh
#!/bin/bash -e -o pipefail
# Xamarin can clean their SDKs while updating to newer versions,
# so we should be able to detect it during image generation
downloadAndInstallPKG() {
local PKG_URL=$1
local PKG_NAME=${PKG_URL##*/}
download_with_retries $PKG_URL
echo "Installing $PKG_NAME..."
@@ -159,7 +159,7 @@ installNunitConsole() {
local MONO_VERSION=$1
cat <<EOF > ${TMPMOUNT}/${NUNIT3_CONSOLE_BIN}
#!/bin/sh
#!/bin/bash -e -o pipefail
exec /Library/Frameworks/Mono.framework/Versions/${MONO_VERSION}/bin/mono --debug \$MONO_OPTIONS $NUNIT3_PATH/nunit3-console.exe "\$@"
EOF
sudo chmod +x ${TMPMOUNT}/${NUNIT3_CONSOLE_BIN}
@@ -180,7 +180,7 @@ downloadNUnitConsole() {
echo "Installing NUnit 3..."
sudo unzip nunit3.zip -d $NUNIT3_PATH
NUNIT3_CONSOLE_BIN=nunit3-console
popd
}