Skip to content

Commit 93a9016

Browse files
committed
try multiple
1 parent b0b39ab commit 93a9016

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

Tools/CI/service.cmb/run_cmb_service.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,24 @@ logError(){
9191

9292
# Unity Version -----------------------------------------------------------------
9393

94+
95+
FILE="artifacts/TestResults.js"
96+
9497
echo "$(<$FILE)"
9598

96-
sed --help
9799

98-
unity_version="$(sed -n 's/.*"editorVersion": *"\([^" (]*\).*/\1/p' $FILE)"
100+
first_sed=$(sed -n 's/.*"editorVersion": *"\([^" (]*\).*/\1/p' $FILE)
101+
102+
103+
second_sed="$(sed -nE 's/.*"editorVersion":[[:space:]]*"([^[:space:]"]+).*/\1/p' $FILE)"
104+
105+
project_settings="$(sed -nE 's/^m_EditorVersion:[[:space:]]*([[:alnum:].]+).*/\1/p' testproject/ProjectSettings/ProjectVersion.txt)"
99106

100107
# ensure arguments were passed and the ports are defined
101-
if [ -z "$unity_version" ]; then
102-
logMessage "Failed to find unity version: $unity_version! Using default string";
108+
if [ -z "$first_sed" ]; then
109+
logMessage "Failed to find unity version: first: $first_sed, second: $second_sed, project_settings: $project_settings! Using default string";
103110
else
104-
logMessage "Found Unity version: $unity_version";
111+
logMessage "Found Unity version: first: $first_sed, second: $second_sed, project_settings: $project_settings";
105112
fi
106113

107114
# # Protocol Buffer Compiler ------------------------------------------------------

0 commit comments

Comments
 (0)