mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-29 06:20:07 +08:00
Add test package; start using jq cli
This commit is contained in:
@@ -20,17 +20,30 @@ if [ "$PACKAGE_MODE" = "true" ]; then
|
||||
echo "###########################"
|
||||
echo ""
|
||||
|
||||
cat UNITY_PROJECT_PATH
|
||||
cat "$UNITY_PROJECT_PATH"
|
||||
|
||||
echo "Creating an empty Unity project to add the package to."
|
||||
PACKAGE_JSON_PATH="$UNITY_PROJECT_PATH/package.json"
|
||||
if [ ! -f "$PACKAGE_JSON_PATH" ]; then
|
||||
echo "Unable to locate package.json from the given package path. Aborting..."
|
||||
exit
|
||||
fi
|
||||
|
||||
PACKAGE_NAME=$(cat "$PACKAGE_JSON_PATH" | jq ".name")
|
||||
|
||||
if [ -z $PACKAGE_NAME ]; then
|
||||
echo "Unable to parse package name from package.json. Aborting..."
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Package name found: ${PACKAGE_NAME}"
|
||||
|
||||
# echo "Creating an empty Unity project to add the package to."
|
||||
|
||||
# unity-editor \
|
||||
# -batchMode \
|
||||
# -createProject "./TempProject" \
|
||||
# -quit
|
||||
|
||||
jq --version
|
||||
|
||||
# UNITY_PROJECT_PATH="./TempProject"
|
||||
fi
|
||||
|
||||
|
||||
14
unity-package-with-correct-tests/package.json
Normal file
14
unity-package-with-correct-tests/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "com.example.packageName",
|
||||
"version": "1.0.0",
|
||||
"displayName": "Example Unity Package",
|
||||
"description": "A package made to test unity-test-runner",
|
||||
"unity": "2019.2",
|
||||
"unityRelease": "11f1",
|
||||
"author": {
|
||||
"name": "Aaron Trudeau",
|
||||
"email": "trudeaua@mail.gvsu.edu",
|
||||
"url": "https://github.com/trudeaua21"
|
||||
},
|
||||
"type": "tool"
|
||||
}
|
||||
Reference in New Issue
Block a user