diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-10-30 17:35:01 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-10-30 17:35:01 +0100 |
| commit | eba087b7351868637cf9dd672898a59452c32529 (patch) | |
| tree | 05a2794de547cfc9be35df73029c7915c96c755c | |
| parent | 059e48363a20fe4680d9e7b46a9de463d2db11e2 (diff) | |
| download | mullvadvpn-eba087b7351868637cf9dd672898a59452c32529.tar.xz mullvadvpn-eba087b7351868637cf9dd672898a59452c32529.zip | |
Use git describe in git-commit-info.txt
| -rw-r--r-- | mullvad-daemon/build.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mullvad-daemon/build.rs b/mullvad-daemon/build.rs index c810fe395a..b39c3fb9ab 100644 --- a/mullvad-daemon/build.rs +++ b/mullvad-daemon/build.rs @@ -27,15 +27,15 @@ fn main() { // Implementation borrowed from rustfmt. Returns a string containing commit hash and commit date // if it was able to obtain it, otherwise an empty string. fn commit_info() -> String { - match (commit_hash(), commit_date()) { + match (commit_description(), commit_date()) { (Some(hash), Some(date)) => format!("({} {})", hash.trim(), date), _ => String::new(), } } -fn commit_hash() -> Option<String> { +fn commit_description() -> Option<String> { Command::new("git") - .args(&["rev-parse", "--short", "HEAD"]) + .args(&["describe", "--dirty"]) .output() .ok() .and_then(|out| String::from_utf8(out.stdout).ok()) |
