mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-12 21:27:37 +02:00
Remove references to "bwrs" #2195
Squashed commit of the following: commit 1bdf1c7954e0731c95703d10118f3874ab5155d3 Merge:8ba6e61
7257251
Author: Daniel García <dani-garcia@users.noreply.github.com> Date: Sun Jan 23 23:40:17 2022 +0100 Merge branch 'remove-bwrs' of https://github.com/RealOrangeOne/vaultwarden into RealOrangeOne-remove-bwrs commit7257251ecf
Author: Jake Howard <git@theorangeone.net> Date: Thu Jan 6 17:48:18 2022 +0000 Use `or_else` to save potentially unnecessary function call commit40ae81dd3c
Author: Jake Howard <git@theorangeone.net> Date: Wed Jan 5 21:18:24 2022 +0000 Move $BWRS_VERSION fallback into build.rs commit743ef74b30
Author: Jake Howard <git@theorangeone.net> Date: Sat Jan 1 23:08:27 2022 +0000 Revert "Add feature to enable use of `Option::or` in const context" This reverts commitfe8e043b8a
. We want to run on stable soon, where these features are not supported commita1f0da638c
Author: Jake Howard <git@theorangeone.net> Date: Sat Jan 1 13:04:47 2022 +0000 Rename web vault version file https://github.com/dani-garcia/bw_web_builds/pull/58 commitfe8e043b8a
Author: Jake Howard <git@theorangeone.net> Date: Sat Jan 1 12:56:44 2022 +0000 Add feature to enable use of `Option::or` in const context commit687435c8b2
Author: Jake Howard <git@theorangeone.net> Date: Sat Jan 1 12:27:28 2022 +0000 Continue to allow using `$BWRS_VERSION` commit8e2f708e50
Author: Jake Howard <git@theorangeone.net> Date: Fri Dec 31 11:41:34 2021 +0000 Remove references to "bwrs" The only remaining one is getting the version of the web vault, which requires coordinating with the web vault patching.
This commit is contained in:
10
src/main.rs
10
src/main.rs
@ -76,16 +76,18 @@ const HELP: &str = "\
|
||||
-v, --version Prints the app version
|
||||
";
|
||||
|
||||
pub const VERSION: Option<&str> = option_env!("VW_VERSION");
|
||||
|
||||
fn parse_args() {
|
||||
const NO_VERSION: &str = "(Version info from Git not present)";
|
||||
let mut pargs = pico_args::Arguments::from_env();
|
||||
let version = VERSION.unwrap_or("(Version info from Git not present)");
|
||||
|
||||
if pargs.contains(["-h", "--help"]) {
|
||||
println!("vaultwarden {}", option_env!("BWRS_VERSION").unwrap_or(NO_VERSION));
|
||||
println!("vaultwarden {}", version);
|
||||
print!("{}", HELP);
|
||||
exit(0);
|
||||
} else if pargs.contains(["-v", "--version"]) {
|
||||
println!("vaultwarden {}", option_env!("BWRS_VERSION").unwrap_or(NO_VERSION));
|
||||
println!("vaultwarden {}", version);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@ -94,7 +96,7 @@ fn launch_info() {
|
||||
println!("/--------------------------------------------------------------------\\");
|
||||
println!("| Starting Vaultwarden |");
|
||||
|
||||
if let Some(version) = option_env!("BWRS_VERSION") {
|
||||
if let Some(version) = VERSION {
|
||||
println!("|{:^68}|", format!("Version {}", version));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user