From c6f6788a41620536f3f1e926965c66192547a09a Mon Sep 17 00:00:00 2001 From: Lachee Date: Wed, 7 May 2025 15:19:28 +1000 Subject: [PATCH] windows-il2cpp probably still wont work --- scripts/build-image.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/build-image.sh b/scripts/build-image.sh index 1b92b5c..f08d8b2 100755 --- a/scripts/build-image.sh +++ b/scripts/build-image.sh @@ -34,6 +34,19 @@ if [ -z "${GAMECI_VERSION}" ]; then GAMECI_VERSION=3 fi +# Ensure IMAGE_OS is set, default to ubuntu if not +if [ -z "${IMAGE_OS}" ]; then + IMAGE_OS="ubuntu" + + # windows-il2cpp requires windows OS + if [ "${UNITY_PLATFORM}" = "windows-il2cpp" ]; then + IMAGE_OS="windows" + fi + + # TODO: MacOS probably requires a mac image. + # Might be worth just putting this in the strategy at this point +fi + # Ensure PLATFORM is set, default to the current system if not if [ -z "${PLATFORM}" ]; then PLATFORM=$(uname -m) @@ -47,8 +60,9 @@ if [ -z "${PLATFORM}" ]; then esac fi -BASE_IMAGE=unityci/editor:ubuntu-${UNITY_VERSION}-${UNITY_PLATFORM}-${GAMECI_VERSION} -TAG=ubuntu-${UNITY_VERSION}-${UNITY_PLATFORM}-runner + +BASE_IMAGE=unityci/editor:${IMAGE_OS}-${UNITY_VERSION}-${UNITY_PLATFORM}-${GAMECI_VERSION} +TAG=${IMAGE_OS}-${UNITY_VERSION}-${UNITY_PLATFORM}-runner FULL_IMAGE=${IMAGE}:${TAG} echo "Building Docker image ${FULL_IMAGE}"