commit 4826ddca4c69356ce9e88c59cb5c424d7c9d5ca3
parent a6cfdddfd8c2711fce850ea8e9038ad0a62f83a3
Author: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Date: Wed, 5 Jul 2023 18:45:08 +0200
Merge pull request #3651 from tessus/fix/branch-on-HEAD
fix version when compiled at a specific commit
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.rs b/build.rs
@@ -72,7 +72,7 @@ fn version_from_git_info() -> Result<String, std::io::Error> {
// Combined version
if let Some(exact) = exact_tag {
Ok(exact)
- } else if &branch != "main" && &branch != "master" {
+ } else if &branch != "main" && &branch != "master" && &branch != "HEAD" {
Ok(format!("{last_tag}-{rev_short} ({branch})"))
} else {
Ok(format!("{last_tag}-{rev_short}"))