mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
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>
This commit is contained in:
@@ -333,6 +333,15 @@ impl Default for RunningState {
|
||||
/// about the context on top of the information here.
|
||||
pub fn get_info() -> BTreeMap<&'static str, String> {
|
||||
let mut res = BTreeMap::new();
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
res.insert(
|
||||
"debug_assertions",
|
||||
"On - DO NOT RELEASE THIS BUILD".to_string(),
|
||||
);
|
||||
#[cfg(not(debug_assertions))]
|
||||
res.insert("debug_assertions", "Off".to_string());
|
||||
|
||||
res.insert("deltachat_core_version", format!("v{}", &*DC_VERSION_STR));
|
||||
res.insert("sqlite_version", rusqlite::version().to_string());
|
||||
res.insert("arch", (std::mem::size_of::<usize>() * 8).to_string());
|
||||
|
||||
Reference in New Issue
Block a user