Skip to content

Commit

Permalink
check.sh: find Godot 4 executable when available as godot
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick-was-taken committed Apr 6, 2023
1 parent 04c2323 commit b5f15ac
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ function findGodot() {
echo "Found 'godot4' executable"
godotBin="godot4"

elif command -v godot &>/dev/null; then
# Check if `godot` actually is Godot 4.x
if godot --version | grep -qE "^4\\."; then
echo "Found 'godot' executable with version $(godot --version)"
godotBin="godot"
else
echo "Godot executable found, but it is the incompatible version $(godot --version)"
exit 2
fi

# Special case for Windows when there is a .bat file
# Also consider that 'cmd /c' would need 'cmd //c' (https://stackoverflow.com/q/21357813)
elif
Expand Down Expand Up @@ -99,7 +109,7 @@ for arg in "${args[@]}"; do
;;
itest)
findGodot

cmds+=("cargo $toolchain build -p itest $extraArgs")
cmds+=("$godotBin --path itest/godot --headless")
;;
Expand Down

0 comments on commit b5f15ac

Please sign in to comment.