1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Newer releases of a sapphire binary: finding them, and installing one.
//!
//! A binary's releases are a GitHub repository's, tagged `<prefix><version>`
//! ([`ReleaseSource`]). [`latest_release`] finds the newest; the app server asks it once a
//! day and shows the answer in `status`. The `update` command ([`UpdateArgs`]) goes one step
//! further and replaces the running executable with the release's, but only:
//!
//! - with a newer version: never a downgrade;
//! - with the asset for this platform, `<asset>-<os>-<arch>[.exe]`, downloaded over HTTPS
//! from the repository's own release: GitHub is the authority on what was released;
//! - when the executable was placed by hand, not by `cargo install`, `cargo binstall` or a
//! package manager, whose own bookkeeping a replaced file would contradict ([`InstallMethod`]).
//!
//! Restarting the running server or service afterwards stays with the user.
pub use ;
pub use ;
/// Errors from finding, fetching or installing a release.
/// This crate's result.
pub type Result<T> = Result;