From b3faef4b80a674294091066e20501e3a5d0f6103 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 5 Apr 2023 01:00:13 +0200 Subject: Bump version --- cli/build.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cli/build.rs') diff --git a/cli/build.rs b/cli/build.rs index 47809487..014960f4 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -6,12 +6,14 @@ fn main() { return; } - let version = Command::new("git") + let pkg = env!("CARGO_PKG_VERSION"); + let hash = Command::new("git") .args(["rev-parse", "HEAD"]) .output() .ok() .filter(|output| output.status.success()) .and_then(|output| String::from_utf8(output.stdout.get(..8)?.into()).ok()) - .unwrap_or_else(|| "(unknown version)".into()); - println!("cargo:rustc-env=TYPST_VERSION={version}"); + .unwrap_or_else(|| "(unknown hash)".into()); + + println!("cargo:rustc-env=TYPST_VERSION={pkg} ({hash})"); } -- cgit v1.2.3