diff --git a/.github/actions/build-assetbundle/Dockerfile b/.github/actions/build-assetbundle/Dockerfile index 7bacc1a..c4db084 100644 --- a/.github/actions/build-assetbundle/Dockerfile +++ b/.github/actions/build-assetbundle/Dockerfile @@ -7,4 +7,4 @@ FROM unityci/editor:${UNITY_VERSION}-windows-mono-3 COPY ./ /KSPBuildTools # Code file to execute when the docker container starts up (`build-assetbundle.sh`) -ENTRYPOINT ["/KSPBuildTools/.github/actions/build-assetbundle/build-assetbundle.sh"] \ No newline at end of file +ENTRYPOINT ["/KSPBuildTools/build-assetbundle.sh", "--editor", "unity-editor"] \ No newline at end of file diff --git a/.github/actions/build-assetbundle/build-assetbundle.sh b/.github/actions/build-assetbundle/build-assetbundle.sh deleted file mode 100755 index a9b90f7..0000000 --- a/.github/actions/build-assetbundle/build-assetbundle.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -l - -echo "hello" diff --git a/build-assetbundle.sh b/build-assetbundle.sh new file mode 100755 index 0000000..d9ad54f --- /dev/null +++ b/build-assetbundle.sh @@ -0,0 +1,23 @@ +#!/bin/bash -l + +POSITIONAL_ARGS=() + +while [[ $# -gt 0 ]]; do + case $1 in + -e|--editor) + EDITOR="$2" + shift # past argument + shift # past value + ;; + -*) + echo "Unknown option $1" + exit 1 + ;; + *) + POSITIONAL_ARGS+=("$1") # save positional arg + shift # past argument + ;; + esac +done + +$EDITOR -version \ No newline at end of file