always emit long format tags

This commit is contained in:
bunnie 2022-10-09 17:57:01 +08:00
parent d048372d46
commit 96e64b6388

View file

@ -10,13 +10,13 @@ use chrono::Local;
pub(crate) fn generate_version(add_timestamp: bool) { pub(crate) fn generate_version(add_timestamp: bool) {
let output = if cfg!(target_os = "windows") { let output = if cfg!(target_os = "windows") {
Command::new("cmd") Command::new("cmd")
.args(["/C", "git describe --tags"]) .args(["/C", "git describe --tags --long"])
.output() .output()
.expect("failed to execute process") .expect("failed to execute process")
} else { } else {
Command::new("sh") Command::new("sh")
.arg("-c") .arg("-c")
.arg("git describe --tags") .arg("git describe --tags --long")
.output() .output()
.expect("failed to execute process") .expect("failed to execute process")
}; };