Truncate SDK folder to minor version

Fixes #15
This commit is contained in:
Davide De Rosa 2020-04-18 14:58:40 +02:00
parent 7e774ecb47
commit 084a0cca75
1 changed files with 10 additions and 0 deletions

View File

@ -363,6 +363,16 @@ if [ ! -n "${WATCHOS_SDKVERSION}" ]; then
WATCHOS_SDKVERSION=$(xcrun -sdk watchos --show-sdk-version) WATCHOS_SDKVERSION=$(xcrun -sdk watchos --show-sdk-version)
fi fi
# Truncate to minor version
MINOR_VERSION=(${MACOS_SDKVERSION//./ })
MACOS_SDKVERSION="${MINOR_VERSION[0]}.${MINOR_VERSION[1]}"
MINOR_VERSION=(${IOS_SDKVERSION//./ })
IOS_SDKVERSION="${MINOR_VERSION[0]}.${MINOR_VERSION[1]}"
MINOR_VERSION=(${TVOS_SDKVERSION//./ })
TVOS_SDKVERSION="${MINOR_VERSION[0]}.${MINOR_VERSION[1]}"
MINOR_VERSION=(${WATCHOS_SDKVERSION//./ })
WATCHOS_SDKVERSION="${MINOR_VERSION[0]}.${MINOR_VERSION[1]}"
# Determine number of cores for (parallel) build # Determine number of cores for (parallel) build
BUILD_THREADS=1 BUILD_THREADS=1
if [ "${PARALLEL}" != "false" ]; then if [ "${PARALLEL}" != "false" ]; then