Skip to content

Commit de4f8c3

Browse files
committed
Added support for automatic segregation of Debug/Release data source
1 parent 79e9abc commit de4f8c3

5 files changed

Lines changed: 16 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.1
2+
3+
* Added support for automatic segregation of Debug/Release data source
4+
15
## 0.2.0
26

37
* BREAKING CHANGE: replaced the `init` function with a `Builder` struct, see README for example usage

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tauri-plugin-aptabase"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
license = "MIT"
55
description = "Tauri Plugin for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps"
66
authors = [ "Guilherme Oenning" ]

examples/helloworld/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"icons/icon.icns",
3434
"icons/icon.ico"
3535
],
36-
"identifier": "com.tauri.dev",
36+
"identifier": "com.aptabase.HelloWorldTauri",
3737
"longDescription": "",
3838
"macOS": {
3939
"entitlements": null,

src/sys.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@ static ENGINE_NAME: &str = "WebKit";
99
#[cfg(target_os = "windows")]
1010
static ENGINE_NAME: &str = "WebView2";
1111

12+
13+
#[cfg(debug_assertions)]
14+
static IS_DEBUG: bool = true;
15+
16+
#[cfg(not(debug_assertions))]
17+
static IS_DEBUG: bool = false;
18+
1219
pub struct SystemProperties {
20+
pub is_debug: bool,
1321
pub os_name: String,
1422
pub os_version: String,
1523
pub locale: String,
@@ -29,6 +37,7 @@ pub fn get_info() -> SystemProperties {
2937
};
3038

3139
SystemProperties {
40+
is_debug: IS_DEBUG,
3241
os_name,
3342
os_version: info.version().to_string(),
3443
locale,

src/track_event.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub fn internal_track_event(
1818
"sessionId": state.eval_session_id(),
1919
"eventName": name,
2020
"systemProps": {
21+
"isDebug": state.sys_info.is_debug,
2122
"osName": state.sys_info.os_name,
2223
"osVersion": state.sys_info.os_version,
2324
"locale": state.sys_info.locale,

0 commit comments

Comments
 (0)