Skip to content

Commit d5c418e

Browse files
authored
feat: Put the debug/release build version into the info (#7034)
The info will look like: ``` debug_assertions=On - DO NOT RELEASE THIS BUILD ``` or: ``` debug_assertions=Off ``` I tested that this actually works when compiling on Android. <details><summary>This is how it looked before the second commit</summary> <p> The deltachat_core_version line in the info will look like: ``` deltachat_core_version=v2.5.0 [debug build] ``` or: ``` deltachat_core_version=v2.5.0 [release build] ``` I tested that this actually works when compiling on Android. </p> </details>
1 parent 8541455 commit d5c418e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/context.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,15 @@ impl Default for RunningState {
333333
/// about the context on top of the information here.
334334
pub fn get_info() -> BTreeMap<&'static str, String> {
335335
let mut res = BTreeMap::new();
336+
337+
#[cfg(debug_assertions)]
338+
res.insert(
339+
"debug_assertions",
340+
"On - DO NOT RELEASE THIS BUILD".to_string(),
341+
);
342+
#[cfg(not(debug_assertions))]
343+
res.insert("debug_assertions", "Off".to_string());
344+
336345
res.insert("deltachat_core_version", format!("v{}", &*DC_VERSION_STR));
337346
res.insert("sqlite_version", rusqlite::version().to_string());
338347
res.insert("arch", (std::mem::size_of::<usize>() * 8).to_string());

0 commit comments

Comments
 (0)