Skip to content

Commit 06f17e7

Browse files
authored
hotfix: only set application_id on linux (#110)
1 parent 693eec3 commit 06f17e7

5 files changed

Lines changed: 41 additions & 6 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
pre-commit:
13+
name: Lint
1314
runs-on: ubuntu-latest
1415
steps:
1516
- uses: actions/checkout@v5
@@ -26,6 +27,25 @@ jobs:
2627
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2728

2829
build:
30+
name: Build on ${{ matrix.os }}
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
os: [ubuntu-latest, windows-latest, macos-latest]
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- uses: actions/checkout@v5
38+
with:
39+
persist-credentials: false
40+
- uses: actions-rust-lang/setup-rust-toolchain@v1
41+
with:
42+
toolchain: stable
43+
44+
- name: Run build
45+
run: cargo build --release
46+
47+
test:
48+
name: Test
2949
runs-on: ubuntu-latest
3050
steps:
3151
- uses: actions/checkout@v5
@@ -42,6 +62,7 @@ jobs:
4262
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
4363

4464
check-changelog:
65+
name: Parse changelog
4566
runs-on: ubuntu-latest
4667
steps:
4768
- uses: actions/checkout@v5

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.4
2+
3+
This is a hotfix release for failed 0.3.3.
4+
15
## 0.3.3
26

37
* bugfix: do not assume that running entry started this week

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ license = "MIT"
3131
name = "toggl-tracker"
3232
readme = "README.md"
3333
repository = "https://github.com/sterliakov/toggl"
34-
version = "0.3.3"
34+
version = "0.3.4"
3535

3636
[profile.release]
3737
lto = true

src/main.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,25 @@ pub fn main() -> iced::Result {
101101
})
102102
.window(window::Settings {
103103
size: (400.0, 600.0).into(),
104-
platform_specific: PlatformSpecific {
105-
application_id: "toggl".to_owned(),
106-
..Default::default()
107-
},
104+
platform_specific: platform_specific(),
108105
..Default::default()
109106
})
110107
.run_with(App::new)
111108
}
112109

110+
#[cfg(target_os = "linux")]
111+
fn platform_specific() -> PlatformSpecific {
112+
PlatformSpecific {
113+
application_id: "toggl".to_owned(),
114+
..Default::default()
115+
}
116+
}
117+
118+
#[cfg(not(target_os = "linux"))]
119+
fn platform_specific() -> PlatformSpecific {
120+
Default::default()
121+
}
122+
113123
#[derive(Debug, Default)]
114124
struct TemporaryState {
115125
running_entry_widget: RunningEntry,

0 commit comments

Comments
 (0)