mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-01 11:06:13 -04:00
feat(gui, tauri, ci): Auto updater (#105)
This commit is contained in:
parent
90584a211d
commit
6c433041b7
10 changed files with 925 additions and 75 deletions
|
@ -23,9 +23,11 @@ swap = { path = "../swap", features = [ "tauri" ] }
|
|||
tauri = { version = "2.0", features = [ "config-json5" ] }
|
||||
tauri-plugin-clipboard-manager = "2.0"
|
||||
tauri-plugin-devtools = "2.0"
|
||||
tauri-plugin-dialog = "2.0.1"
|
||||
tauri-plugin-process = "2.0"
|
||||
tauri-plugin-shell = "2.0"
|
||||
tauri-plugin-store = "2.0"
|
||||
tauri-plugin-updater = "2.0.2"
|
||||
tracing = "0.1"
|
||||
|
||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
"shell:allow-open",
|
||||
"store:default",
|
||||
"process:default",
|
||||
"cli:allow-cli-matches"
|
||||
"cli:allow-cli-matches",
|
||||
"dialog:default",
|
||||
"updater:default",
|
||||
"process:allow-restart"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ use swap::cli::{
|
|||
command::{Bitcoin, Monero},
|
||||
};
|
||||
use tauri::{async_runtime::RwLock, Manager, RunEvent};
|
||||
use tauri_plugin_dialog;
|
||||
|
||||
/// Trait to convert Result<T, E> to Result<T, String>
|
||||
/// Tauri commands require the error type to be a string
|
||||
|
@ -127,6 +128,8 @@ fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
|||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(tauri_plugin_store::Builder::new().build())
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
}
|
||||
},
|
||||
"bundle": {
|
||||
"createUpdaterArtifacts": true,
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
|
@ -34,6 +35,14 @@
|
|||
]
|
||||
},
|
||||
"plugins": {
|
||||
"updater": {
|
||||
"active": true,
|
||||
"dialog": true,
|
||||
"endpoints": [
|
||||
"https://cdn.crabnebula.app/update/unstoppableswap/unstoppableswap-gui-rs/{{target}}-{{arch}}/{{current_version}}"
|
||||
],
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyNTQ3NTQxQTQ2MkI4N0IKUldSN3VHS2tRWFZVMGpWYytkRFg4dFBzNEh5ZnlxaHBubGpRalVMMG5nVytiR3JPOUE3QjRxc00K"
|
||||
},
|
||||
"cli": {
|
||||
"description": "Start the GUI application",
|
||||
"args": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue