File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7777 },
7878 "updater" : {
7979 "pubkey" : " dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK" ,
80+ "dangerousInsecureTransportProtocol" : true ,
8081 "endpoints" : [
82+ " http://localhost:5173/updater-test/updater.json" ,
8183 " https://tauri-update-server.vercel.app/update/{{target}}/{{current_version}}"
8284 ]
8385 }
Original file line number Diff line number Diff line change 1- <script >
2- import { check } from ' @tauri-apps/plugin-updater'
1+ <script lang = " ts " >
2+ import { check , Update } from ' @tauri-apps/plugin-updater'
33 import { relaunch } from ' @tauri-apps/plugin-process'
44
5- export let onMessage
5+ let { onMessage } = $props ()
66
7- let isChecking, isInstalling, newUpdate
7+ let isChecking = $state (false )
8+ let isInstalling = $state (false )
9+ let newUpdate: Update = $state ()
810 let totalSize = 0 ,
911 downloadedSize = 0
1012
5456 }
5557 }
5658
57- $ : progress = totalSize ? Math .round ((downloadedSize / totalSize) * 100 ) : 0
59+ let progress = $derived ( totalSize ? Math .round ((downloadedSize / totalSize ) * 100 ) : 0 )
5860 </script >
5961
6062<div class =" flex children:grow children:h10" >
6163 {#if ! isChecking && ! newUpdate }
62- <button class ="btn" on:click ={checkUpdate }>Check update</button >
64+ <button class ="btn" onclick ={checkUpdate }>Check update</button >
6365 {:else if ! isInstalling && newUpdate }
64- <button class ="btn" on:click ={install }>Install update</button >
66+ <button class ="btn" onclick ={install }>Install update</button >
6567 {:else }
6668 <div class =" progress" >
6769 <span >{progress }%</span >
Original file line number Diff line number Diff line change 1+ *
2+
3+ ! .gitignore
4+ ! README.md
5+ ! updater.json
Original file line number Diff line number Diff line change 1+ To test the updater:
2+
3+ 1 . Comment out ` verify_signature ` inside ` plugins/updater/src/updater.rs `
4+ 2 . Run ` pnpm tauri build --debug ` to build the bundles
5+ 3 . Copy the bundle you want to test to this folder (` examples/api/updater-test/ ` )
6+ 4 . Run ` pnpm tauri dev ` and open the Updater tab to check
7+
8+ If the bundle you're testing doesn't exist in the ` updater.json ` yet, add it manually and welcome to open an PR
9+
10+ > The ` updater.json ` and debug bundles will be served by ` vite `
Original file line number Diff line number Diff line change 1+ {
2+ "version" : " 2.1.0" ,
3+ "notes" : " Test update!" ,
4+ "pub_date" : " 2026-03-01T14:04:20+00:00" ,
5+ "platforms" : {
6+ "windows-x86_64" : {
7+ "signature" : " " ,
8+ "url" : " http://localhost:5173/updater-test/Tauri API_2.0.0_x64_en-US.msi"
9+ }
10+ }
11+ }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export default defineConfig(async () => {
2727 port : 5173 ,
2828 strictPort : true ,
2929 fs : {
30- allow : [ '.' , '../../tooling/api/dist' ]
30+ allow : [ '.' ]
3131 }
3232 }
3333 }
You can’t perform that action at this time.
0 commit comments