-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from arduano/trunk
Updating dependencies to be able to compile again, plus various cleanups
- Loading branch information
Showing
17 changed files
with
1,463 additions
and
746 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use std::fmt; | ||
|
||
use clap::ValueEnum; | ||
|
||
#[derive(Debug, Clone, Copy)] | ||
pub enum DiscordBranch { | ||
STABLE, | ||
PTB, | ||
CANARY, | ||
DEVELOPMENT, | ||
} | ||
|
||
impl fmt::Display for DiscordBranch { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
write!(f, "{}", self.to_possible_value().unwrap().get_name()) | ||
} | ||
} | ||
|
||
impl clap::ValueEnum for DiscordBranch { | ||
fn value_variants<'a>() -> &'a [Self] { | ||
&[ | ||
DiscordBranch::STABLE, | ||
DiscordBranch::CANARY, | ||
DiscordBranch::PTB, | ||
DiscordBranch::DEVELOPMENT, | ||
] | ||
} | ||
|
||
fn to_possible_value(&self) -> Option<clap::builder::PossibleValue> { | ||
match self { | ||
DiscordBranch::STABLE => Some(clap::builder::PossibleValue::new("stable")), | ||
DiscordBranch::CANARY => Some(clap::builder::PossibleValue::new("canary")), | ||
DiscordBranch::PTB => Some(clap::builder::PossibleValue::new("ptb")), | ||
DiscordBranch::DEVELOPMENT => Some(clap::builder::PossibleValue::new("development")), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
mod install; | ||
mod install_openasar; | ||
mod remove; | ||
mod run; | ||
mod show; | ||
mod update; | ||
mod run; | ||
|
||
pub use {install::install, install_openasar::install_openasar, remove::remove, show::show, update::update, run::run}; | ||
pub use install::install; | ||
pub use install_openasar::install_openasar; | ||
pub use remove::remove; | ||
pub use run::run; | ||
pub use show::show; | ||
pub use update::update; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,7 @@ | ||
pub const VERSION: &str = "1.1.9"; | ||
pub const INSTALL_DESC: &str = "install the latest <type> of discord"; | ||
pub const INSTALL_ALIASES: &[&str] = &["i", "in", "get"]; | ||
pub const INSTALL_OPENASAR_DESC: &str = "install openasar for <type> of discord"; | ||
pub const INSTALL_OPENASAR_ALIASES: &[&str] = &["asar", "oa"]; | ||
pub const UPDATE_DESC: &str = "update to the latest <type> of discord"; | ||
pub const UPDATE_ALIASES: &[&str] = &["u", "up", "upgrade"]; | ||
pub const REMOVE_DESC: &str = "remove the installed <type> of discord"; | ||
pub const REMOVE_ALIASES: &[&str] = &["r", "rm", "d", "del", "un", "uninstall"]; | ||
pub const SHOW_DESC: &str = "show all installed versions"; | ||
pub const SHOW_ALIASES: &[&str] = &["s", "installed", "all", "a", "versions", "types"]; | ||
pub const COMP_DESC: &str = "get shell completions"; | ||
pub const COMP_ALIASES: &[&str] = &["c", "comp"]; | ||
pub const RUN_DESC: &str = "run discord with specific options"; | ||
pub const RUN_ALIASES: &[&str] = &["r", "start"]; | ||
|
||
pub const POSSIBLE_SHELLS: &[&str] = &[ | ||
"bash", "b", | ||
"elvish", "e", | ||
"fish", "f", | ||
"powershell", "pwsh", "ps", "p", | ||
"zsh", "z" | ||
]; | ||
|
||
pub const POSSIBLE_VALUES: &[&str] = &[ | ||
"stable", | ||
"discord-stable", | ||
"s", | ||
|
||
"canary", | ||
"discord-canary", | ||
"c", | ||
|
||
"ptb", | ||
"discord-ptb", | ||
"p", | ||
|
||
"development", | ||
"dev", | ||
"discord-development", | ||
"d", | ||
]; |
Oops, something went wrong.