diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/build.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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() { | |||
39 | } | 39 | } |
40 | 40 | ||
41 | fn rev() -> Option<String> { | 41 | fn rev() -> Option<String> { |
42 | let output = Command::new("git").args(&["rev-parse", "HEAD"]).output().ok()?; | 42 | let output = Command::new("git").args(&["describe", "--tags"]).output().ok()?; |
43 | let stdout = String::from_utf8(output.stdout).ok()?; | 43 | let stdout = String::from_utf8(output.stdout).ok()?; |
44 | let short_hash = stdout.get(0..7)?; | 44 | Some(stdout) |
45 | Some(short_hash.to_owned()) | ||
46 | } | 45 | } |