We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b41fb7f commit 13a525fCopy full SHA for 13a525f
version/src/lib.rs
@@ -67,7 +67,11 @@ impl Default for Version {
67
major: env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(),
68
minor: env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(),
69
patch: env!("CARGO_PKG_VERSION_PATCH").parse().unwrap(),
70
- commit: compute_commit(option_env!("CI_COMMIT")),
+ commit: if cfg!(debug_assertions) {
71
+ Some(0)
72
+ } else {
73
+ compute_commit(option_env!("CI_COMMIT"))
74
+ },
75
feature_set,
76
}
77
@@ -89,6 +93,7 @@ impl fmt::Debug for Version {
89
93
self.patch,
90
94
match self.commit {
91
95
None => "devbuild".to_string(),
96
+ Some(commit) if commit == 0 => "dbgbuild".to_string(),
92
97
Some(commit) => format!("{:08x}", commit),
98
},
99
self.feature_set,
0 commit comments