update-app.sh: also kill the packaged binary (…/bin/shonar-desktop), not just java MainKt — without it a packaged run survived the update and the relaunch left a twin window

This commit is contained in:
avi 2026-09-22 12:20:55 -05:00
commit 668ecbefd0

View file

@ -28,9 +28,14 @@ if ! ./gradlew :app:createDistributable -q; then
fi fi
# Stop the app (and its engine) only AFTER a good build exists. # Stop the app (and its engine) only AFTER a good build exists.
# Packaged runs appear as .../bin/shonar-desktop; dev runs as java MainKt.
pkill -f 'com.shonar.desktop.MainKt' 2>/dev/null pkill -f 'com.shonar.desktop.MainKt' 2>/dev/null
pkill -f 'shonar-desktop/bin/shonar-desktop' 2>/dev/null
pkill -f 'uvicorn shonar.main:app' 2>/dev/null pkill -f 'uvicorn shonar.main:app' 2>/dev/null
sleep 2 sleep 2
# Last resort: anything still holding a SHONAR window.
pkill -f 'shonar-desktop' 2>/dev/null
sleep 2
bin="$repo/app/build/compose/binaries/main/app/shonar-desktop/bin/shonar-desktop" bin="$repo/app/build/compose/binaries/main/app/shonar-desktop/bin/shonar-desktop"
[ -x "$bin" ] || { echo "distributable missing at $bin"; exit 1; } [ -x "$bin" ] || { echo "distributable missing at $bin"; exit 1; }