Files
drover-go/cmd/drover
root 19f851afb0
Build / test (push) Successful in 1m15s
Build / build-windows (push) Successful in 57s
Release / release (push) Successful in 3m16s
Auto-update on startup: prompt + apply + auto-restart
Double-clicking drover.exe now silently checks for updates first
(8s timeout, ignores network failures). If a newer release is
published, a YES/NO message box asks the user; on YES we download,
verify SHA256, apply via selfupdate, and re-launch the binary so
the user immediately sees the new version's window.

NO or no update → straight to the smoke-test window as before.
Update errors show an error dialog, then continue.

Implementation:
- internal/updater is reused as-is — the existing CheckForUpdate +
  ApplyUpdate API is enough.
- autoupdate_windows.go owns the dialog and re-launch logic
  (golang.org/x/sys/windows for MessageBoxW, os/exec for fresh
  process). autoupdate_other.go is the no-op stub for Linux CI.
- relaunchSelf uses cmd.Start (fire and forget) — no Wait. Current
  process os.Exit(0) immediately so the OS doesn't keep both
  generations of drover running.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 03:21:59 +03:00
..