Add in-app self-update via git (Hilfe menu)

New Updater class + "Hilfe" menubar:
- "Nach Update suchen": git fetch + count of new upstream commits.
- Quiet background check on start; surfaces via status bar + menu label.
- Install: git merge --ff-only, pip install if requirements.txt changed,
  then restart via os.execv. data/ is git-ignored and untouched.
- Fast-forward only; diverged history or offline -> clear message, no action.
- Inert unless run from a git clone with git on PATH.

Also: "Version…" menu item shows the installed commit.

Verified against throwaway git repos (check / ff-update / diverged / no-op /
non-clone) and via GUI build on Python 3.14 / Tk 9.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-07 22:06:51 +02:00
parent e3bbd4d264
commit 1bed723363
7 changed files with 330 additions and 10 deletions
+13 -3
View File
@@ -212,9 +212,19 @@ Second review, focused on the interface. Items 112 implemented; 13 deferred.
Full custom DRK-red *theme* (recolouring `primary` etc.) was **not** done — the
red header bar gives the branding without fighting ttkbootstrap's theme system.
## Self-update (2026-09-07) — ✅ done
**Hilfe ▸ Nach Update suchen** / quiet check on start / restart via `os.execv`.
`git merge --ff-only` only, `pip install` if `requirements.txt` changed, `data/`
untouched. Needs a git clone + `git` installed (`Updater.available`).
Open follow-ups: no rollback if a pushed update is broken (mitigated by
`--ff-only` from a branch Patrick controls + pip errors caught pre-restart);
`run.sh` / `.desktop` still not committed (item 5).
## Suggested order of remaining work
1. Initial git commit (item 4), then decide on committing `orte.csv`.
2. Pinned deps + `run.sh` / `.desktop` launcher in the repo (item 5).
3. Stable `id` column (item 7 of the first review).
4. Formalize tests (item 10); offline map (item 9) only if offline use becomes real.
2. **Set up the git remote** the updater pulls from, and pin all deps (item 5).
3. `run.sh` + `.desktop` launcher in the repo (item 5).
4. Stable `id` column (item 7 of the first review).
5. Formalize tests (item 10); offline map (item 9) only if offline use becomes real.