aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/commands/self_update.rs
blob: 3497d7dd0167c26ccd9a2613851c8e13a599a79e (plain)
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
48
49
50
51
52
53
54
55
use clap::Args;

#[derive(Args)]
pub struct SelfUpdateArgs {
    /// Version to update to
    pub version: Option<String>,

    /// Revert to a previous version
    #[arg(short, long)]
    pub rollback: bool,

    /// Delete old backups during self-update
    #[arg(long)]
    pub clean_backups: bool,

    /// Do not output download progress
    #[arg(long)]
    pub no_progress: bool,

    /// Prompt user for a key update
    #[arg(long)]
    pub update_keys: bool,

    /// Force update to the stable channel
    #[arg(long)]
    pub stable: bool,

    /// Force update to the preview channel
    #[arg(long)]
    pub preview: bool,

    /// Force update to the snapshot channel
    #[arg(long)]
    pub snapshot: bool,

    /// Force update to the 1.x channel
    #[arg(long = "1")]
    pub channel_1: bool,

    /// Force update to the 2.x channel
    #[arg(long = "2")]
    pub channel_2: bool,

    /// Force update to the 2.2.x LTS channel
    #[arg(long = "2.2")]
    pub channel_2_2: bool,

    /// Only store the channel as default and skip the update
    #[arg(long)]
    pub set_channel_only: bool,
}

pub fn execute(_args: &SelfUpdateArgs) {
    todo!()
}