Expand description
Asking GitHub which release is newest: the two addresses, the version and release read out of what comes back, and the made-up release the demo switch offers.
Structs§
- Release
- What GitHub said the newest release is.
- Version
- A release version. Semver underneath, so a pre-release sorts below
the release it precedes: a
0.2.0-rc.1build is told when0.2.0is out, and anrctagged latest is offered as thercit is. - Where
- The two places GitHub answers “which release is newest”: the REST API, which says so in JSON with the release notes attached, and the releases page, which redirects to the newest one and says nothing else.
Functions§
- fetch_
latest - Ask GitHub. Blocking; runs on the check thread.
Nonefor any kind of no: offline, too slow, no release yet, or an answer that is not a release. Each is logged at a level nobody is shown, and none is the player’s problem. - parse_
release - Read a release out of the GitHub API’s
releases/latestreply.Nonefor anything that is not one, a tag that is not a version included. - release_
from_ redirect - A release read off where the releases page sends the browser:
.../releases/tag/v1.2.0. Notes are not to be had this way.