diff --git a/src/build.rs b/src/build.rs index 5490f9c..953557a 100644 --- a/src/build.rs +++ b/src/build.rs @@ -3,7 +3,10 @@ use ructe::Ructe; use vergen::EmitBuilder; fn main() -> Result<()> { - EmitBuilder::builder().git_sha(true).emit()?; + EmitBuilder::builder() + .git_sha(true) + .git_describe(true, true, None) + .emit()?; let mut ructe = Ructe::from_env()?; let mut statics = ructe.statics()?; diff --git a/src/statics.rs b/src/statics.rs index 3e799f2..8469ad1 100644 --- a/src/statics.rs +++ b/src/statics.rs @@ -5,7 +5,8 @@ pub struct VersionInfo<'a> { pub(crate) const VERSION_INFO: VersionInfo = VersionInfo { commit: env!("VERGEN_GIT_SHA"), - version: env!("CARGO_PKG_VERSION"), + version: env!("VERGEN_GIT_DESCRIBE"), + // version: env!("CARGO_PKG_VERSION"), }; lazy_static! { diff --git a/templates/base.rs.html b/templates/base.rs.html index da9a3cf..b895835 100644 --- a/templates/base.rs.html +++ b/templates/base.rs.html @@ -35,7 +35,7 @@