From 35fb587e22d7d132e94b4e61a604ba466fe60a84 Mon Sep 17 00:00:00 2001 From: xuan <1359774872@qq.com> Date: Wed, 14 Oct 2026 09:35:27 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8E=BB=E6=8E=89=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E7=9A=84=E6=9C=AC=E5=9C=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - scripts/upload-apk.js | 11 ++--------- scripts/upload-apk.local.example.json | 3 --- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 scripts/upload-apk.local.example.json diff --git a/.gitignore b/.gitignore index 6796079..a29738a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ pnpm-lock.yaml # Environment variables .env.local .env.*.local -scripts/upload-apk.local.json # Build output and cache /.hbuilderx/ diff --git a/scripts/upload-apk.js b/scripts/upload-apk.js index a9279ac..6ce8415 100644 --- a/scripts/upload-apk.js +++ b/scripts/upload-apk.js @@ -20,8 +20,7 @@ const path = require('path'); const readline = require('readline'); const ROOT = path.resolve(__dirname, '..'); -const LOCAL_CONFIG = path.join(__dirname, 'upload-apk.local.json'); -const API_BASE_DEFAULT = 'https://hcscmtest.zzfzyc.com/hcscm_weave'; +const API_BASE = 'https://hcscmtest.zzfzyc.com/hcscm_weave'; const UPYUN_API = 'https://v0.api.upyun.com'; const CDN_HOST = { test: 'https://testhcscm.cdn.zzfzyc.com', @@ -61,12 +60,6 @@ function readManifestVersion() { return String(manifest.versionName || '').trim(); } -function loadApiBase() { - if (!fs.existsSync(LOCAL_CONFIG)) return API_BASE_DEFAULT; - const config = JSON.parse(fs.readFileSync(LOCAL_CONFIG, 'utf8')); - return String(config.apiBase || API_BASE_DEFAULT).replace(/\/+$/, ''); -} - function ask(question) { const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); return new Promise((resolve) => { @@ -254,7 +247,7 @@ async function main() { const status = args.target === 'prod' ? 2 : 1; const fileName = `${version}.apk`; const saveKey = `/version/${upgradeName}/${fileName}`; - const apiBase = loadApiBase(); + const apiBase = API_BASE; const token = await login(apiBase); console.log(`版本号: ${version}`); diff --git a/scripts/upload-apk.local.example.json b/scripts/upload-apk.local.example.json deleted file mode 100644 index 397b26f..0000000 --- a/scripts/upload-apk.local.example.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "apiBase": "https://hcscmtest.zzfzyc.com/hcscm_weave" -}