feat(deploy): 在线更新 - 新增后台检查、强制备份迁移与失败自动回退

This commit is contained in:
ddCat
2026-08-30 22:15:17 +08:00
parent 8227921c68
commit 694cb974fb
60 changed files with 4124 additions and 93 deletions

View File

@@ -5,7 +5,7 @@ import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
const webDir = dirname(fileURLToPath(import.meta.url));
const appVersion = readFileSync(resolve(webDir, "../VERSION"), "utf8").trim();
const appVersion = process.env.CANVAS_BUILD_VERSION?.trim() || readFileSync(resolve(webDir, "../VERSION"), "utf8").trim();
const appChangelog = readFileSync(resolve(webDir, "../CHANGELOG.md"), "utf8");
const apiProxyTarget = process.env.VITE_API_PROXY_TARGET?.trim() || "http://127.0.0.1:8080";
@@ -14,6 +14,7 @@ export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(appVersion),
__APP_CHANGELOG__: JSON.stringify(appChangelog),
"import.meta.env.VITE_APP_VERSION": JSON.stringify(appVersion),
},
server: {
proxy: {