From 23a0849d6b759639e3e55168810cad8f48023e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Mon, 17 Aug 2026 00:59:55 +0800 Subject: [PATCH] fix(hololake): bind updater trust into bundle config --- .../hololake-native-desktop/scripts/foundation.test.mjs | 2 ++ .../hololake-native-desktop/src-tauri/tauri.conf.json | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/product-source/hololake-native-desktop/scripts/foundation.test.mjs b/product-source/hololake-native-desktop/scripts/foundation.test.mjs index 18dcc6f61..85ce157a7 100644 --- a/product-source/hololake-native-desktop/scripts/foundation.test.mjs +++ b/product-source/hololake-native-desktop/scripts/foundation.test.mjs @@ -22,6 +22,8 @@ test('HoloLake updater trust is product-owned and contains no inherited endpoint assert.deepEqual(trust.allowedReleaseHosts, ['guanghulab.com']) assert.equal(trust.state, 'PROVISIONED') assert.ok(trust.publicKey.length > 100) + assert.deepEqual(tauriConfig.plugins.updater.endpoints, trust.endpoints) + assert.equal(tauriConfig.plugins.updater.pubkey, trust.publicKey) for (const relative of [ 'foundation.json', 'src-tauri/release-trust.json', diff --git a/product-source/hololake-native-desktop/src-tauri/tauri.conf.json b/product-source/hololake-native-desktop/src-tauri/tauri.conf.json index 24a759bbb..836ebf2db 100644 --- a/product-source/hololake-native-desktop/src-tauri/tauri.conf.json +++ b/product-source/hololake-native-desktop/src-tauri/tauri.conf.json @@ -24,6 +24,14 @@ "csp": "default-src 'self'; connect-src 'self' ipc: http://ipc.localhost; img-src 'self' data:; style-src 'self' 'unsafe-inline'; script-src 'self'" } }, + "plugins": { + "updater": { + "endpoints": [ + "https://guanghulab.com/hololake/releases/latest.json" + ], + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDEzQkYzRTQ5QTE2MEFDMzEKUldReHJHQ2hTVDYvRTZNNDVqZDUxLzRZMmxuT1pSM2Q5RTRZbzRCZUZ0d0FxVVNidGJ0dUQyMnoK" + } + }, "bundle": { "active": true, "targets": "all",