We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b141a95 commit cafc608Copy full SHA for cafc608
1 file changed
build.rs
@@ -7,17 +7,7 @@ fn main() {
7
}
8
9
fn get_git_version() -> String {
10
- let tag = git_output(&["describe", "--tags", "--exact-match"]);
11
-
12
- tag.unwrap_or({
13
- match (
14
- git_output(&["rev-list", "--count", "HEAD"]),
15
- git_output(&["rev-parse", "--short=7", "HEAD"]),
16
- ) {
17
- (Some(rev_count), Some(short_hash)) => format!("r{rev_count}.{short_hash}"),
18
- _ => env!("CARGO_PKG_VERSION").to_string(),
19
- }
20
- })
+ git_output(&["describe", "--tags"]).unwrap_or(env!("CARGO_PKG_VERSION").to_string())
21
22
23
fn git_output(args: &[&str]) -> Option<String> {
0 commit comments