From 2daa7f0811e4ffcdfb2b7e39314da2d931145a56 Mon Sep 17 00:00:00 2001 From: Luke D Jones Date: Wed, 23 Sep 2020 22:12:47 +1200 Subject: [PATCH] Git internal version from crate version --- asus-nb-ctrl/src/lib.rs | 2 +- asus-notify/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asus-nb-ctrl/src/lib.rs b/asus-nb-ctrl/src/lib.rs index bff66b9b..6c7fb395 100644 --- a/asus-nb-ctrl/src/lib.rs +++ b/asus-nb-ctrl/src/lib.rs @@ -19,7 +19,7 @@ use config::Config; use crate::error::RogError; use zbus::ObjectServer; -pub static VERSION: &str = "2.0.3"; +pub static VERSION: &str = env!("CARGO_PKG_VERSION"); pub trait Reloadable { fn reload(&mut self) -> Result<(), RogError>; diff --git a/asus-notify/src/main.rs b/asus-notify/src/main.rs index de905a23..4bb63771 100644 --- a/asus-notify/src/main.rs +++ b/asus-notify/src/main.rs @@ -6,7 +6,7 @@ use std::error::Error; use std::time::Duration; fn main() -> Result<(), Box> { - println!("Version 1.0.1"); + println!("Version {}", env!("CARGO_PKG_VERSION")); let mut cfg = Config::read_new()?; let mut last_profile = String::new();