From 88ef0541a5110563f3f2e92532da37209d264ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 12 Mar 2021 19:49:00 +0200 Subject: Improve version display --- crates/rust-analyzer/build.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/rust-analyzer/build.rs b/crates/rust-analyzer/build.rs index 5ae76ba30..999dc5928 100644 --- a/crates/rust-analyzer/build.rs +++ b/crates/rust-analyzer/build.rs @@ -39,8 +39,7 @@ fn set_rerun() { } fn rev() -> Option { - let output = Command::new("git").args(&["rev-parse", "HEAD"]).output().ok()?; + let output = Command::new("git").args(&["describe", "--tags"]).output().ok()?; let stdout = String::from_utf8(output.stdout).ok()?; - let short_hash = stdout.get(0..7)?; - Some(short_hash.to_owned()) + Some(stdout) } -- cgit v1.2.3