summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-01-21 13:11:07 +0100
committerJustus Winter <justus@sequoia-pgp.org>2021-01-21 13:11:07 +0100
commit8483758899c68cb19113236f23ad2380697f5201 (patch)
treec10b6775df9bb0b293c4331595cbfaee3409ab94
parent04aa0213ed1d0568f991b12d99ef6ebfefe0f03f (diff)
sq: Include the version of sequoia-openpgp in sq's version.
-rw-r--r--sq/Cargo.toml1
-rw-r--r--sq/src/sq_cli.rs8
2 files changed, 8 insertions, 1 deletions
diff --git a/sq/Cargo.toml b/sq/Cargo.toml
index bda5481f..ca0adb17 100644
--- a/sq/Cargo.toml
+++ b/sq/Cargo.toml
@@ -37,6 +37,7 @@ rpassword = "5.0"
[build-dependencies]
clap = "2.33"
+sequoia-openpgp = { path = "../openpgp", version = "1.0.0", default-features = false }
[dev-dependencies]
assert_cli = "0.6"
diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs
index c7de8cfe..bd37788c 100644
--- a/sq/src/sq_cli.rs
+++ b/sq/src/sq_cli.rs
@@ -17,8 +17,14 @@ pub fn build() -> App<'static, 'static> {
/// - Armor (5xx)
/// - Inspection & packet manipulation (6xx)
pub fn configure(app: App<'static, 'static>) -> App<'static, 'static> {
+ let version = Box::leak(
+ format!("{} (sequoia-openpgp {})",
+ env!("CARGO_PKG_VERSION"),
+ sequoia_openpgp::VERSION)
+ .into_boxed_str()) as &str;
+
let app = app
- .version(env!("CARGO_PKG_VERSION"))
+ .version(version)
.about("Sequoia is an implementation of OpenPGP. This is a command-line frontend.")
.settings(&[
AppSettings::SubcommandRequiredElseHelp,