feat: v1.2.2, add features for --version
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1885,7 +1885,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||
|
||||
[[package]]
|
||||
name = "oss-backupd"
|
||||
version = "1.2.1"
|
||||
version = "1.2.2"
|
||||
dependencies = [
|
||||
"argparse",
|
||||
"base64 0.22.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "oss-backupd"
|
||||
version = "1.2.1"
|
||||
version = "1.2.2"
|
||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -28,8 +28,15 @@ use opt::Options;
|
||||
// https://gitlab.com/sequoia-pgp/sequoia/blob/master/openpgp/examples/generate-encrypt-decrypt.rs
|
||||
fn main() -> XResult<()> {
|
||||
let options = Options::new_and_parse_args()?;
|
||||
|
||||
#[allow(unused_mut)]
|
||||
let mut features: Vec<&str> = vec![];
|
||||
#[cfg(feature = "use_zip")]
|
||||
features.push("use_zip");
|
||||
#[cfg(feature = "use_sequoia_openpgp")]
|
||||
features.push("use_sequoia_openpgp");
|
||||
if options.version {
|
||||
information!("{} v{}", config_util::NAME, config_util::VERSION);
|
||||
information!("{NAME} v{VERSION}, features: [{}]", features.join(", "));
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user