mirror of
https://github.com/NLnetLabs/dnst.git
synced 2026-08-17 21:25:51 +02:00
[keygen] Implement '-v' with version info
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ openssl = ["domain/openssl"]
|
||||
ring = ["domain/ring"]
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
clap = { version = "4", features = ["cargo", "derive"] }
|
||||
domain = { git = "http://github.com/NLnetLabs/domain", branch = "main", features = ["unstable-sign"] }
|
||||
lexopt = "0.3.0"
|
||||
|
||||
|
||||
@@ -108,7 +108,14 @@ impl LdnsCommand for Keygen {
|
||||
force_symlinks = true;
|
||||
}
|
||||
|
||||
// TODO: '-v' version argument?
|
||||
Arg::Short('v') => {
|
||||
let version = clap::crate_version!();
|
||||
// NOTE: The outer version is the latest version of 'ldns-keygen' we are
|
||||
// compatible with. This needs to be updated manually.
|
||||
println!("DNSSEC key generator version 1.8.4 (dnst version {version})");
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
||||
Arg::Value(value) => {
|
||||
if name.is_some() {
|
||||
return Err("cannot specify multiple domain names".into());
|
||||
|
||||
Reference in New Issue
Block a user