Add test package; start using jq cli

pull/164/head
Aaron Trudeau 2021-10-21 00:42:24 -04:00
parent 1a54f845f3
commit b38a591326
No known key found for this signature in database
GPG Key ID: 29F89A9BDAAF7BDE
2 changed files with 31 additions and 4 deletions

View File

@ -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

View 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"
}