feat: v1.2.2, add features for --version

This commit is contained in:
2025-01-17 00:04:44 +08:00
parent 83b2687388
commit 840e222e36
3 changed files with 10 additions and 3 deletions

2
Cargo.lock generated
View File

@@ -1885,7 +1885,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "oss-backupd"
version = "1.2.1"
version = "1.2.2"
dependencies = [
"argparse",
"base64 0.22.1",

View File

@@ -1,6 +1,6 @@
[package]
name = "oss-backupd"
version = "1.2.1"
version = "1.2.2"
authors = ["Hatter Jiang <jht5945@gmail.com>"]
edition = "2018"

View File

@@ -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(());
}