Skip to main content

Module github

Module github 

Source
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.1 build is told when 0.2.0 is out, and an rc tagged latest is offered as the rc it 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. None for 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/latest reply. None for 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.