diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a013190..7157e56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,6 +57,9 @@ jobs: - name: Install app dependencies and build it run: yarn && yarn build:fe + - name: Rewrite tauri.conf.json + run: yarn fix:conf + - name: fix tray icon if: matrix.platform != 'macos-latest' run: | diff --git a/package.json b/package.json index fa52f1b..dd9e962 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "build": "yarn tauri build", "updater": "tr updater", "release": "tr release --git", + "fix:conf": "tr override --json.tauri_updater_active=false", "fix:tray": "tr override --json.tauri_systemTray_iconPath=\"icons/tray-icon-light.png\" --json.tauri_systemTray_iconAsTemplate=false", "fix:tray:mac": "tr override --json.tauri_systemTray_iconPath=\"icons/tray-icon.png\" --json.tauri_systemTray_iconAsTemplate=true", "download": "node ./scripts/download.js", diff --git a/src-tauri/src/utils.rs b/src-tauri/src/utils.rs index 4f55cff..c7a1732 100644 --- a/src-tauri/src/utils.rs +++ b/src-tauri/src/utils.rs @@ -10,6 +10,7 @@ use std::{ }; use tauri::{utils::config::Config, Manager, AppHandle, Wry}; use tauri::updater::UpdateResponse; + pub fn chat_root() -> PathBuf { tauri::api::path::home_dir().unwrap().join(".chatgpt") } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 7483925..c6611f7 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -67,7 +67,7 @@ "csp": null }, "updater": { - "active": false, + "active": true, "dialog": true, "endpoints": [ "https://lencx.github.io/ChatGPT/install.json"