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:
co-authored by
Claude Opus 5.5
parent
444933b004
commit
d3b232f0ee
@@ -0,0 +1,20 @@
|
||||
// The updater without flutter: ask Garage for the newest release, download it
|
||||
// with resume, check the sha256, install it and restart.
|
||||
//
|
||||
// A headless dart program (an agent, a cli) imports this one. A flutter app
|
||||
// wants package:garage_updates/garage_updates.dart instead, which is this
|
||||
// plus the splash.
|
||||
//
|
||||
// final engine = UpdateEngine.detect(project: "<project id>", build: 12);
|
||||
// final info = await engine.check();
|
||||
// if (info.hasUpdate) {
|
||||
// await engine.download(info.latest!);
|
||||
// await engine.install(info.latest!);
|
||||
// await engine.restart(args: args);
|
||||
// }
|
||||
//
|
||||
// android isnt in here, installing an apk needs a platform channel.
|
||||
library;
|
||||
|
||||
export "src/core/models.dart";
|
||||
export "src/core/io.dart" if (dart.library.js_interop) "src/core/web.dart";
|
||||
Reference in New Issue
Block a user