Skip to content

Commit f86addf

Browse files
Reisenilya-bobyr
authored andcommitted
feat: affix d to the end of debug vers
1 parent ec354bb commit f86addf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

version/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ impl Default for Version {
6767
major: env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(),
6868
minor: env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(),
6969
patch: env!("CARGO_PKG_VERSION_PATCH").parse().unwrap(),
70-
commit: compute_commit(option_env!("CI_COMMIT")),
70+
commit: if cfg!(debug_assertions) {
71+
Some(0)
72+
} else {
73+
compute_commit(option_env!("CI_COMMIT"))
74+
},
7175
feature_set,
7276
}
7377
}
@@ -89,6 +93,7 @@ impl fmt::Debug for Version {
8993
self.patch,
9094
match self.commit {
9195
None => "devbuild".to_string(),
96+
Some(commit) if commit == 0 => "dbgbuild".to_string(),
9297
Some(commit) => format!("{:08x}", commit),
9398
},
9499
self.feature_set,

0 commit comments

Comments
 (0)