feat(garage_updates): an auto updater for garage apps

Asks Garage for the newest release of a project, downloads it with resume,
checks the sha256, installs it beside the old one and restarts into it.
Splash on garage_ui, a native stub and a first time installer for windows,
bundle swap on mac, the system installer on android. No-op on web.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KHotisA4hV2xmuZsHTksFX
This commit is contained in:
ImBenji
2026-10-12 06:37:02 +01:00
co-authored by Claude Opus 5.5
parent 444933b004
commit d3b232f0ee
56 changed files with 9031 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
// Auto updates for a flutter app, akin to Discord's. One call at the top of
// main and the rest happens on its own:
//
// Future<void> main(List<String> args) async {
// await GarageUpdater.launch(
// args: args,
// project: "<project id>",
// build: 12,
// label: "v2610-1",
// branding: UpdaterBranding(name: "Garage Stash", logo: "assets/logo.png"),
// );
// runApp(const MyApp());
// }
//
// While the app runs, GarageUpdater.instance.ready says when a newer build has
// been downloaded, and restartToUpdate() moves over to it.
//
// On the web every call is a no-op.
library;
export "src/core/models.dart"
show UpdateInfo, UpdateRelease, UpdateAsset, UpdateStatus, UpdateError, UpdateDriver, DownloadProgress;
export "src/branding.dart" show UpdaterBranding, UpdateMode;
export "src/splash.dart" show UpdateSplash, UpdateSplashApp, SplashController, SplashStage;
export "src/updater.dart" show GarageUpdater;