[godot] Fix packaging of web templates for Godot 4.3, see #2684

This commit is contained in:
Mario Zechner 2024-11-15 15:17:37 +01:00
parent a90bdce403
commit f0e5da6ccc

View File

@ -459,22 +459,25 @@ jobs:
aws s3 cp godot-editor-macos.zip s3://spine-godot/$BRANCH/$GODOT_TAG/
echo "$GODOT_VERSION" > version.txt
# Extract the major and minor version from GODOT_VERSION
GODOT_MAJOR_MINOR=$(echo "$GODOT_VERSION" | sed -E 's/^([0-9]+\.[0-9]+).*/\1/')
# Check if the version is >= 4.3
echo "Major.Minor version: $GODOT_MAJOR_MINOR"
if [[ $(echo "$GODOT_MAJOR_MINOR >= 4.3" | bc) -eq 1 ]]; then
mv web_release.zip web_nothreads_release.zip
mv web_debug.zip web_nothreads_debug.zip
WEB_RELEASE_FILE="web_nothreads_release.zip"
WEB_DEBUG_FILE="web_nothreads_debug.zip"
echo "Version >= 4.3. Adding all web_xxx.zip files to template zip."
WEB_FILES=(web_nothreads_debug.zip web_nothreads_release.zip web_dlink_debug.zip web_dlink_nothreads_debug.zip web_dlink_release.zip web_dlink_nothreads_release.zip)
else
WEB_RELEASE_FILE="web_release.zip"
WEB_DEBUG_FILE="web_debug.zip"
echo "Version < 4.3. Adding only web_debug.zip and web_release.zip."
WEB_FILES=(web_debug.zip web_release.zip)
fi
ls -lah
zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip windows_debug_x86_64.exe windows_release_x86_64.exe linux_debug.x86_64 linux_release.x86_64 "$WEB_DEBUG_FILE" "$WEB_RELEASE_FILE" android_release.apk android_debug.apk android_source.zip version.txt
echo "Web files to include: ${WEB_FILES[@]}"
zip spine-godot-templates-$BRANCH-$GODOT_TAG.zip ios.zip macos.zip \
windows_debug_x86_64.exe windows_release_x86_64.exe \
linux_debug.x86_64 linux_release.x86_64 "${WEB_FILES[@]}" \
android_release.apk android_debug.apk android_source.zip version.txt
aws s3 cp spine-godot-templates-$BRANCH-$GODOT_TAG.zip s3://spine-godot/$BRANCH/$GODOT_TAG/spine-godot-templates-$BRANCH-$GODOT_TAG.tpz
upload-to-s3-mono: