#580

Updater: let users switch between release channels (e.g. stable ↔ canary)

Openrsolmanoopened 12d ago

What we want

We'd like to put a setting in our app: "Update channel: Stable / Nightly." Picking one should move the user to that channel on the next update, without reinstalling the app by hand.

Why it doesn't work today

The updater only follows the channel the app was built with. Even if we point it at another channel's update file, it rejects it ("release identity does not match this app"). So right now a user who wants to change channel has to download a different installer.

Proposal

An opt-in way to choose the channel:

await Updater.checkForUpdate({ channel: "canary" });
await Updater.downloadUpdate();
await Updater.applyUpdate();

The default stays as it is today: no channel means the current channel.

Things to decide

  1. App name / location. On macOS a canary build is MyApp-canary.app and stable is MyApp.app. After switching, should the app be renamed, or keep its current name?
  2. Moving "back." Going from canary 1.3.0-canary.5 to stable 1.2.0 looks like a downgrade. The updater should allow it when the user switched channels on purpose.
  3. Install data. Each channel keeps its own install data folder (<identifier>/<channel>). Should switching move it, or start fresh?

Workaround today

We ship a "Download the other channel" button, and the two apps sit side by side. It works, but it isn't a real switch.

Happy to help with a PR if the direction sounds good.

Activity

0

No activity yet.