fix(release): rebuild old tags that predate the bundled Python plugin

A dispatched rebuild checks out the tag's commit but runs main's
workflow; v2026.40 has no stage-bundled.sh, so the macOS bundle step
failed. Skip the plugin with a warning in that case only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-04 20:59:42 +03:00
1 parent f14b675ff7
commit 4700e263e3
1 file changed
+10 -4
+10 -4
View File
@@ -492,10 +492,16 @@ jobs:
cp AppIcon.icns "$APP/Contents/Resources/AppIcon.icns"
cp DWG.icns DXF.icns "$APP/Contents/Resources/"
# First-party Python scripting plugin. It remains out of process and
# uses the same API/toolchain as this host build.
bash plugins/opencad-python/tools/stage-bundled.sh \
"$APP/Contents/Resources/plugins/opencad.python" \
--target aarch64-apple-darwin
# uses the same API/toolchain as this host build. A dispatched
# rebuild of a tag cut before the plugin existed ships without it.
STAGE=plugins/opencad-python/tools/stage-bundled.sh
if [ -f "$STAGE" ] || [ "${{ github.event_name }}" != workflow_dispatch ]; then
bash "$STAGE" \
"$APP/Contents/Resources/plugins/opencad.python" \
--target aarch64-apple-darwin
else
echo "::warning::$STAGE missing at this commit; Python plugin not bundled"
fi
# QuickLook thumbnail extension.
cp -R DWGThumbnail.appex "$APP/Contents/PlugIns/"
# Substitute version into Info.plist.