Add test package; start using jq cli
parent
1a54f845f3
commit
b38a591326
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
}
|
Loading…
Reference in New Issue