Commit graph

5 commits

Author SHA1 Message Date
avi
205342bcbc update-app.sh: authenticated pull via ~/.config/shonar-desktop/forgejo.token (chmod 600, outside the repo) — one-click in-app update works without interactive credentials; anonymous pull kept as fallback when no token file 2026-09-23 14:56:04 -05:00
avi
028724ff4d update-app.sh: last-resort kill by exact process name (pgrep -x) — the loose -f 'shonar-desktop' pattern still caught invoker shells outside the script's own ppid chain (persistent command daemons whose cmdline quotes the script path) 2026-09-22 12:30:37 -05:00
avi
c948ca7367 update-app.sh: kill by pattern EXCLUDING own process lineage — pkill -f matched any ancestor shell mentioning the script path, so an update run could SIGTERM its own invoker; app-kill now walks the ppid chain and spares it 2026-09-22 12:24:26 -05:00
avi
668ecbefd0 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 2026-09-22 12:20:55 -05:00
avi
fc5502a7cd Installable app + one-click update from forgejo
- scripts/update-app.sh: detached updater (setsid, survives app exit):
  git pull atitlan master -> gradle createDistributable -> only then
  kill app+engine and relaunch the fresh binary. Pull or build failure
  leaves the running app alone. Log: ~/.config/shonar-desktop/logs/update.log.
- Settings → About & updates: 'Install update' button appears when the
  check finds a newer remote commit; hands off to the script and tells
  the user the app will relaunch itself.
- Desktop entry (~/.local/share/applications/shonar-desktop.desktop,
  outside the repo): launches the packaged distributable via
  launch-desktop.sh; SHONAR_REPO fallback already resolves the tree,
  so the packaged app spawns the engine and sees the updater script.

Gate: :app:compileKotlin + :app:test green; desktop-file-validate clean;
launcher verified (app window from the menu path); updater fail-safe
verified (dirty-tree pull refused, app survived).
2026-09-22 12:18:24 -05:00