updater

command
v3.0.0-alpha2.113 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 7 Imported by: 0

README

Updater example

A minimal Wails v3 application that ships in-app updates from a GitHub release. Demonstrates:

  • Configuring app.Updater with a single Provider (GitHub Releases)
  • Wiring a menu item to app.Updater.CheckAndInstall
  • Subscribing to updater:* events from both Go and JavaScript

Run

go run .

Out of the box the example reports itself as v1.0.0 and points at wailsapp/updater-demo, which publishes a v2.0.0 release for darwin/arm64, linux/amd64, and windows/amd64. Click App → Check for Updates… and the flow runs end-to-end: download, SHA256 verify, atomic swap, restart into the new binary.

Override the defaults via env to point at your own repo:

APP_VERSION=1.0.0 GH_REPOSITORY=your-org/your-repo go run .

Customising the update window

The framework opens a default window with release notes, a progress bar, and Install / Skip / Remind / Cancel buttons. Override:

  • CSS only: Window: &updater.BuiltinWindow{CSS: …}
  • Full template: Window: &updater.BuiltinWindow{HTML: …}
  • Window chrome: Window: &updater.BuiltinWindow{Options: …}
  • Headless: Window: updater.WindowNone

Verification

Out of the box the example uses digest verification: the GitHub provider is configured with ChecksumAsset: "SHA256SUMS", the demo's release ships that sidecar, and the framework refuses to install an artifact whose SHA-256 doesn't match what the sidecar declares.

For stronger trust, layer on signature verification by setting publicKey in main.go to your project's Ed25519 / Ed25519ph / ECDSA-P256 public key. The framework refuses to install a signed release when no key is configured — by design. The demo doesn't sign its releases, so leave publicKey empty when running against wailsapp/updater-demo.

Documentation

Overview

Updater example: a minimal Wails v3 app that ships in-app updates from a GitHub release. Three pieces wire together:

  1. app.Updater.Init configures the source + current version.
  2. A menu item triggers app.Updater.CheckAndInstall, which opens the default update window and walks the full flow.
  3. The frontend subscribes to updater:* events to show its own progress UI alongside the framework window.

Out of the box, the example reports as v1.0.0 and points at wailsapp/updater-demo — a public repo that publishes a v2.0.0 release for each supported platform, so "Check for Updates…" finds, downloads, verifies, swaps, and restarts into a real upgraded binary.

Pass APP_VERSION / GH_REPOSITORY env vars to point this at your own repo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL