desktop 앱 적용

This commit is contained in:
Macbook
2026-06-14 10:15:54 +09:00
parent 7a2f65088c
commit 86b99d8c10
81 changed files with 8164 additions and 37 deletions
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
PUB_PATH="${TAURI_SIGNER_PUB:-$ROOT/desktop/updater.pub}"
CONF="$ROOT/desktop/src-tauri/tauri.conf.json"
if [[ ! -f "$PUB_PATH" ]]; then
echo "[patch-updater-pubkey] skip — no $PUB_PATH (run setup-desktop-updater-keys.sh)"
exit 0
fi
PUBKEY="$(grep -v '^[[:space:]]*#' "$PUB_PATH" | grep -v '^[[:space:]]*$' | tr -d '\n\r' | head -c 500)"
if [[ -z "$PUBKEY" || "$PUBKEY" == "REPLACE_WITH_TAURI_SIGNER_PUBKEY" ]]; then
echo "[patch-updater-pubkey] skip — invalid or placeholder pubkey in $PUB_PATH"
exit 0
fi
CONF="$CONF" PUBKEY="$PUBKEY" node -e "
const fs = require('fs');
const confPath = process.env.CONF;
const pubkey = process.env.PUBKEY;
const conf = JSON.parse(fs.readFileSync(confPath, 'utf8'));
conf.plugins = conf.plugins || {};
conf.plugins.updater = conf.plugins.updater || {};
conf.plugins.updater.pubkey = pubkey;
fs.writeFileSync(confPath, JSON.stringify(conf, null, 2) + '\n');
console.log('[patch-updater-pubkey] updated', confPath);
"