Release to some users first
A staged rollout offers a new version to only a percentage of computers. If something is wrong with it, fewer people are affected.--rollout 50, and finally write the feed without --rollout to give it to everyone.
How it behaves:
- Each computer gets a number from 0 to 99 for that version, so a computer in the first 10% stays included as you raise the percentage. A different version picks a different group.
- Computers outside the rollout count as up to date for
--check-update,--download-updateand background updates. --update, which a person starts, always installs.- New installs from the online installer always get the newest version.
Offer beta versions
bach.toml
2.0.0-beta.1, and write its feed to the beta file:
beta_feed answers --channel beta with exit code 1.
Make updates smaller with patches
A patch is a small setup file that contains only what changed since an earlier version. It helps when your app is large and most files stay the same, like an Electron app. Keep the setup file you published for the old version, and build with it. For an app called Hello, going from 1.3.0 to 1.4.0:- A computer on exactly the old version, with its files unchanged, downloads the patch.
- Everyone else downloads the full setup file.
- Before changing anything, the patch checks that every file it relies on is exactly as expected. If one isn’t, nothing is touched and the app downloads the full file instead.
- A changed file of 64 KB or more is stored as a binary delta, only what differs from the old file, when that’s clearly smaller. So a big program with a few changes costs little.
- A patch is itself a setup file, so it’s never smaller than about 10 MB.
bach buildonly adds it to the feed if it’s at least a fifth smaller than the full file, and says so when it doesn’t. - The feed offers one patch. Make it from the version most of your users have.
- If you sign after building, write the feed again with the signed patch:
bach feed <setup file> --patch <patch file>. - The window opened by
--updatewithout--silentalways uses the full file. First installs and the online installer do too. - With the GitHub Action, pass
args: --patch-from OLD.exe.