fix: publish hot updates on update domain
This commit is contained in:
@@ -9,7 +9,7 @@ const hotstate = require("./hotstate");
|
|||||||
const UA = "codex-market";
|
const UA = "codex-market";
|
||||||
const OWNER = "mhgmh";
|
const OWNER = "mhgmh";
|
||||||
const REPO = "codex-market-app";
|
const REPO = "codex-market-app";
|
||||||
const API = `https://up.tokendun.cc/api/v1/repos/${OWNER}/${REPO}`;
|
const API = `https://update.tokendun.cc/api/v1/repos/${OWNER}/${REPO}`;
|
||||||
const HOT_TAG = "hot";
|
const HOT_TAG = "hot";
|
||||||
// 可选 ed25519 公钥(SPKI PEM)。留空则只做 sha256 校验;填入后强制校验签名。
|
// 可选 ed25519 公钥(SPKI PEM)。留空则只做 sha256 校验;填入后强制校验签名。
|
||||||
const HOT_PUBKEY_PEM = "";
|
const HOT_PUBKEY_PEM = "";
|
||||||
|
|||||||
+1
-1
@@ -284,7 +284,7 @@ const UPDATE_OWNER = "mhgmh";
|
|||||||
const UPDATE_REPO = "codex-market-app";
|
const UPDATE_REPO = "codex-market-app";
|
||||||
// 自建 gitea 发布源(国内可达、匿名可读):完整包更新和热更都走这里。
|
// 自建 gitea 发布源(国内可达、匿名可读):完整包更新和热更都走这里。
|
||||||
// up 域名给 API/直连,update 域名给用户浏览下载页(管理登录会话在此)。
|
// up 域名给 API/直连,update 域名给用户浏览下载页(管理登录会话在此)。
|
||||||
const GITEA_RELEASES_API = `https://up.tokendun.cc/api/v1/repos/${UPDATE_OWNER}/${UPDATE_REPO}/releases/latest`;
|
const GITEA_RELEASES_API = `https://update.tokendun.cc/api/v1/repos/${UPDATE_OWNER}/${UPDATE_REPO}/releases/latest`;
|
||||||
const GITEA_RELEASES_PAGE = `https://update.tokendun.cc/${UPDATE_OWNER}/${UPDATE_REPO}/releases`;
|
const GITEA_RELEASES_PAGE = `https://update.tokendun.cc/${UPDATE_OWNER}/${UPDATE_REPO}/releases`;
|
||||||
|
|
||||||
// 比较版本号:a>b 返回 1,a<b 返回 -1,相等 0
|
// 比较版本号:a>b 返回 1,a<b 返回 -1,相等 0
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ if (!token) {
|
|||||||
if (!token) { console.error("缺少 gitea token:设置 GIT_TOKEN 或写入 ~/.tokendun-git-token"); process.exit(1); }
|
if (!token) { console.error("缺少 gitea token:设置 GIT_TOKEN 或写入 ~/.tokendun-git-token"); process.exit(1); }
|
||||||
|
|
||||||
const OWNER = "mhgmh", REPO = "codex-market-app", TAG = "hot";
|
const OWNER = "mhgmh", REPO = "codex-market-app", TAG = "hot";
|
||||||
const API = `https://up.tokendun.cc/api/v1/repos/${OWNER}/${REPO}`;
|
const API = `https://update.tokendun.cc/api/v1/repos/${OWNER}/${REPO}`;
|
||||||
const DL = `https://up.tokendun.cc/${OWNER}/${REPO}/releases/download/${TAG}`;
|
const DL = `https://update.tokendun.cc/${OWNER}/${REPO}/releases/download/${TAG}`;
|
||||||
|
|
||||||
const OUT = path.join(ROOT, "dist-hot");
|
const OUT = path.join(ROOT, "dist-hot");
|
||||||
fs.mkdirSync(OUT, { recursive: true });
|
fs.mkdirSync(OUT, { recursive: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user