This commit is contained in:
2023-03-24 22:27:49 -07:00
parent 84dff91168
commit 834357eac1
4 changed files with 81 additions and 33 deletions

View File

@@ -0,0 +1,38 @@
#!/bin/bash
UNITY_TARGET="$1"
TARGET=$(echo "$UNITY_TARGET" | awk '{print tolower($0)}')
BUILD_ARG=""
case $TARGET in
"windows")
UNITY_TARGET=Win64
BUILD_ARG=-buildWindows64Player
;;
"windows32bit")
UNITY_TARGET=Win
BUILD_ARG=-buildWindowsPlayer
;;
"mac")
UNITY_TARGET=OSXUniversal
BUILD_ARG=-buildOSXUniversalPlayer
;;
"ios")
UNITY_TARGET=iOS
;;
"linux")
UNITY_TARGET=Linux64
BUILD_ARG=-buildLinux64Player
;;
"android")
UNITY_TARGET=Android
;;
"webgl")
UNITY_TARGET=WebGL
;;
*)
echo "Invalid target. Valid options are: Windows, Windows32bit, Mac, iOS, Linux, Android, WebGL"
;;
esac
echo "::set-output name=buildTarget::$UNITY_TARGET"
echo "::set-output name=buildArg::$BUILD_ARG"