Skip to content

Commit aa3c002

Browse files
chore: bump version to 1.1.0
1 parent 842e535 commit aa3c002

9 files changed

Lines changed: 36 additions & 115 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ jobs:
9090
uses: tauri-apps/tauri-action@v0
9191
env:
9292
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
94+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
9395
with:
9496
tagName: ${{ github.ref_name }}
9597
releaseName: "Release ${{ github.ref_name }}"
@@ -126,6 +128,8 @@ jobs:
126128
uses: tauri-apps/tauri-action@v0
127129
env:
128130
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131+
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
132+
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
129133
with:
130134
tagName: ${{ github.ref_name }}
131135
releaseName: "Release ${{ github.ref_name }}"

.gitleaksignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDYzRDFFMTBFRTEzOTg2QTgKUldTb2hqbmhEdUhSWTFhRGFEN0tEekx0ZWxBb0ZHSmxnOWlLMldTRmxiLzN2S3VHc0dyZ0xka2cK

release.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ if [ -f "src-tauri/tauri.conf.json" ]; then
3535
sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/g" src-tauri/tauri.conf.json
3636
fi
3737

38-
# 4. src-tauri/tauri.conf.json.example
39-
sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/g" src-tauri/tauri.conf.json.example
40-
4138
# 5. Footer component
4239
sed -i "s/>v$CURRENT_VERSION</>v$NEW_VERSION</g" src/app/shared/components/footer/footer.component.html
4340

setup.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "../gen/schemas/desktop-schema.json",
3+
"identifier": "default",
4+
"description": "Default capabilities for the main window",
5+
"windows": ["main"],
6+
"permissions": [
7+
"core:default",
8+
"shell:allow-open",
9+
"notification:default",
10+
"updater:default"
11+
]
12+
}

src-tauri/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@ fn main() {
152152
})
153153
.build(app)?;
154154

155-
// Start background update checker
156-
updater::start_background_update_checker(app.handle().clone());
157-
158155
Ok(())
159156
})
160157
.on_window_event(|window, event| {

src-tauri/src/updater.rs

Lines changed: 13 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
use tauri::AppHandle;
22
use tauri_plugin_updater::UpdaterExt;
3-
use std::time::Duration;
43

54
#[tauri::command]
65
pub async fn check_for_updates(app_handle: AppHandle) -> Result<bool, String> {
76
match app_handle.updater() {
87
Ok(updater) => {
98
match updater.check().await {
109
Ok(Some(update)) => {
11-
println!("✅ Update available from GitHub: {}", update.version);
10+
println!("[UPDATE] Available: {}", update.version);
1211
Ok(true)
1312
}
1413
Ok(None) => {
15-
println!("📦 No update available from GitHub");
14+
println!("[UPDATE] No update available");
1615
Ok(false)
1716
}
1817
Err(e) => {
19-
eprintln!("❌ Failed to check GitHub for updates: {}", e);
20-
// If signature verification fails, provide helpful error
21-
if e.to_string().contains("signature") || e.to_string().contains("public key") {
22-
return Err("Signature verification failed. For development, you can disable signing in tauri.conf.json".to_string());
23-
}
18+
eprintln!("[UPDATE ERROR] Check failed: {}", e);
2419
Err(e.to_string())
2520
}
2621
}
2722
}
2823
Err(e) => {
29-
eprintln!("⚠️ Updater not configured: {}", e);
30-
Err(format!("Updater not available: {} (Check tauri.conf.json configuration)", e))
24+
eprintln!("[UPDATE ERROR] Updater not configured: {}", e);
25+
Err(format!("Updater not available: {}", e))
3126
}
3227
}
3328
}
@@ -38,79 +33,32 @@ pub async fn install_update(app_handle: AppHandle) -> Result<(), String> {
3833
Ok(updater) => {
3934
match updater.check().await {
4035
Ok(Some(update)) => {
41-
println!("Installing update: {}", update.version);
36+
println!("[UPDATE] Installing: {}", update.version);
4237

43-
// Download the update
44-
let mut downloaded = 0;
4538
let bytes = update
4639
.download(
4740
|chunk_length, content_length| {
48-
downloaded += chunk_length;
49-
println!("downloaded {downloaded} from {content_length:?}");
41+
println!("[DOWNLOAD] {} / {:?}", chunk_length, content_length);
5042
},
5143
|| {
52-
println!("download finished");
44+
println!("[DOWNLOAD] Finished");
5345
},
5446
)
5547
.await
5648
.map_err(|e| e.to_string())?;
5749

58-
println!("Update downloaded successfully");
59-
60-
// Install the update
6150
update.install(&bytes).map_err(|e| e.to_string())?;
62-
63-
// Restart the application
64-
app_handle.restart();
65-
}
66-
Ok(None) => {
67-
Err("No update available to install".to_string())
68-
}
69-
Err(e) => {
70-
eprintln!("Failed to check for updates: {}", e);
71-
Err(e.to_string())
51+
app_handle.restart()
7252
}
53+
Ok(None) => Err("No update available".to_string()),
54+
Err(e) => Err(e.to_string()),
7355
}
7456
}
75-
Err(e) => {
76-
eprintln!("Updater not available: {}", e);
77-
Err(format!("Updater not available: {}", e))
78-
}
57+
Err(e) => Err(format!("Updater not available: {}", e)),
7958
}
8059
}
8160

8261
#[tauri::command]
83-
pub async fn get_current_version() -> String {
62+
pub fn get_current_version() -> String {
8463
env!("CARGO_PKG_VERSION").to_string()
8564
}
86-
87-
pub fn start_background_update_checker(app_handle: AppHandle) {
88-
let handle = app_handle.clone();
89-
tokio::spawn(async move {
90-
let mut interval = tokio::time::interval(Duration::from_secs(3600)); // Check every hour
91-
92-
loop {
93-
interval.tick().await;
94-
95-
// Check for updates silently from GitHub releases
96-
if let Ok(update_available) = check_for_updates(handle.clone()).await {
97-
if update_available {
98-
println!("Silent update check: GitHub release update available, installing automatically...");
99-
100-
// Wait a bit to avoid potential conflicts
101-
tokio::time::sleep(Duration::from_secs(30)).await;
102-
103-
// Install update silently
104-
match install_update(handle.clone()).await {
105-
Ok(_) => {
106-
println!("Silent update from GitHub completed successfully");
107-
}
108-
Err(e) => {
109-
eprintln!("Failed to install silent update from GitHub: {}", e);
110-
}
111-
}
112-
}
113-
}
114-
}
115-
});
116-
}

src-tauri/tauri.conf.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
},
2828
"bundle": {
2929
"active": true,
30+
"createUpdaterArtifacts": true,
3031
"targets": "all",
3132
"icon": [
3233
"icons/32x32.png",
@@ -41,11 +42,14 @@
4142
},
4243
"plugins": {
4344
"updater": {
44-
"active": true,
45+
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDYzRDFFMTBFRTEzOTg2QTgKUldTb2hqbmhEdUhSWTFhRGFEN0tEekx0ZWxBb0ZHSmxnOWlLMldTRmxiLzN2S3VHc0dyZ0xka2cK",
4546
"endpoints": [
4647
"https://github.com/stephanebouget/github-security-alerts/releases/latest/download/latest.json"
4748
],
48-
"dialog": false
49+
"dialog": false,
50+
"windows": {
51+
"installMode": "passive"
52+
}
4953
}
5054
}
5155
}

src-tauri/tauri.conf.json.example

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)