mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-29 06:12:04 +08:00
add logic to copy package to folder without activation file
This commit is contained in:
13
dist/steps/run_tests.sh
vendored
13
dist/steps/run_tests.sh
vendored
@@ -14,6 +14,19 @@ echo "Using project path \"$UNITY_PROJECT_PATH\"."
|
||||
if [ "$PACKAGE_MODE" = "true" ]; then
|
||||
echo "Running tests on a Unity package rather than a Unity project."
|
||||
|
||||
ACTIVATE_LICENSE_FILE_NAME="_activate-license"
|
||||
|
||||
if [ -f "$ACTIVATE_LICENSE_FILE_NAME"]; then
|
||||
echo "Package is in repository root. Copying package to temporary directory to avoid Unity Errors."
|
||||
|
||||
ROOT_FOLDER_NAME=$(echo "${PWD##*/}")
|
||||
COPIED_PACKAGE_DIR_NAME="copiedPackage"
|
||||
|
||||
rsync -r "$GITHUB_WORKSPACE" "$COPIED_PACKAGE_DIR_NAME" --exclude "ACTIVATE_LICENSE_FILE_NAME"
|
||||
|
||||
UNITY_PROJECT_PATH="$COPIED_PACKAGE_DIR_NAME/$ROOT_FOLDER_NAME"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "###########################"
|
||||
echo "# Package Folder #"
|
||||
|
||||
Reference in New Issue
Block a user