main: Display git commit hash with the '--version' option

Add a build-script to propagate the git commit hash to other crates at
compile time through environment variables, and display the hash along
with the '--version' option.

Fixes #729

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2020-02-12 21:11:03 -08:00
committed by Sebastien Boeuf
parent bdb92f9ace
commit ebd83699dc
3 changed files with 27 additions and 2 deletions
+1
View File
@@ -4,6 +4,7 @@ version = "0.5.0"
authors = ["The Cloud Hypervisor Authors"]
edition = "2018"
default-run = "cloud-hypervisor"
build = "build.rs"
[dependencies]
arc-swap = ">=0.4.4"