build: Add the 'v' prefix when using the crate version

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2020-10-29 07:23:34 -07:00 committed by Bo Chen
parent b947320feb
commit cd1c2ed31e

View File

@ -9,7 +9,7 @@ extern crate clap;
use std::process::Command; use std::process::Command;
fn main() { fn main() {
let mut version = crate_version!().to_string(); let mut version = "v".to_owned() + crate_version!();
if let Ok(git_out) = Command::new("git").args(&["describe", "--dirty"]).output() { if let Ok(git_out) = Command::new("git").args(&["describe", "--dirty"]).output() {
if git_out.status.success() { if git_out.status.success() {