Update check
How the app learns that a new version is out, and what it sends to find out.
src/update.rs asks whether a newer release is out. It fetches only the list of releases. Nothing about the person or their data is sent.
Where it asks#
update::FEED:https://katlendar.date/releases.json. The site's Worker serves GitHub's release list, trimmed and cached for 10 minutes (see The website).- If the site can't be reached, GitHub's API:
https://api.github.com/repos/kud3n013/katlendar/releases?per_page=30.
When it finds one, the app offers a link to update::RELEASES_PAGE, https://katlendar.date/download.
Both addresses on katlendar.date are permanent. Copies already installed call them, so they must keep working (see Conventions).
What gets offered#
update::pick chooses from the list:
- Drafts are skipped, and so are tags that aren't a version.
- Someone running a beta (a version with a
-part, such as0.1.0-beta.2) is offered betas and full releases. - Someone running a full release is offered only full releases.
- Only a version higher than the running one counts. The highest one wins.
When it runs#
At start, then every 12 hours while the app is open. It is skipped while taking screenshots.
The check_updates setting turns it off. It sits on Settings › Info. Its (i) opens the guide's privacy page at "Check for updates", because guide::of_settings sends the Info page there.
Trying it#
cargo run -- --check-update
KATLENDAR_UPDATE shows the "new version" notice in a screenshot without asking anything (see Testing).