diff --git a/.claude/skills/project-management/SKILL.md b/.claude/skills/project-management/SKILL.md index e40be58..ce7ae76 100644 --- a/.claude/skills/project-management/SKILL.md +++ b/.claude/skills/project-management/SKILL.md @@ -9,7 +9,7 @@ Project root: `/Users/wushumin/www/biyou/anxinyan`. Use the outer repository as the single source of truth for all project work. Do not create separate Git branch systems inside `server-api`, `admin-web`, `user-app`, or `work-app`. -Do not manage release artifacts in Git. Files under `releases/`, including zip packages, APKs, and checksum files, are local delivery artifacts and must not be committed or pushed. +Do not manage release artifacts in Git. Files under `releases/` and `releases_dev/`, including zip packages, APKs, and checksum files, are local delivery artifacts and must not be committed or pushed. Put production packages in `releases/` and test packages in `releases_dev/`. ## Branch Model @@ -59,7 +59,7 @@ Before changing code symbols, follow the repository `AGENTS.md` GitNexus rule: r For release packaging or deployment preparation, also follow the release checklist and packaging skill. At minimum, run the relevant backend smoke/audit scripts and frontend checks for the surfaces touched. -Release packages should stay under the ignored local `releases/` directory and be handed off separately from Git branches. +Production packages should stay under the ignored local `releases/` directory and use `https://api.anxinjianyan.com`. Test packages should stay under the ignored local `releases_dev/` directory and use `https://test.api.anxinjianyan.com`. Hand off both kinds of artifacts separately from Git branches. ## Documentation Source diff --git a/.gitignore b/.gitignore index 61216fc..66ed690 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ runtime/ dist/ unpackage/ releases/ +releases_dev/ # env .env diff --git a/admin-web/.env.test b/admin-web/.env.test index da57c2c..ba9d998 100644 --- a/admin-web/.env.test +++ b/admin-web/.env.test @@ -1,3 +1,3 @@ -VITE_API_BASE_URL=https://test-api.example.com +VITE_API_BASE_URL=https://test.api.anxinjianyan.com VITE_APP_ENV=test VITE_APP_TITLE=安心验管理后台 diff --git a/admin-web/package.json b/admin-web/package.json index 650de3a..edba4d3 100644 --- a/admin-web/package.json +++ b/admin-web/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", + "build:test": "vue-tsc -b && vite build --mode test", "preview": "vite preview" }, "dependencies": { diff --git a/docs/development/branch-workflow.md b/docs/development/branch-workflow.md index f1ad91c..0e1d31a 100644 --- a/docs/development/branch-workflow.md +++ b/docs/development/branch-workflow.md @@ -2,7 +2,7 @@ 本项目使用最外层 Git 仓库统一管理 `server-api`、`admin-web`、`user-app`、`work-app` 和文档。不要在子目录中单独维护分支体系;涉及多端联动的需求应放在同一个功能分支和合并请求中,方便评审、测试、发版和回滚。 -`releases/` 下的 zip、apk、校验文件等发布产物只作为本地交付物管理,不纳入 Git 分支管理范围,也不要提交或推送到远程仓库。 +`releases/` 和 `releases_dev/` 下的 zip、apk、校验文件等发布产物只作为本地交付物管理,不纳入 Git 分支管理范围,也不要提交或推送到远程仓库。正式包放 `releases/`,测试包放 `releases_dev/`。 ## 长期分支 @@ -47,9 +47,9 @@ git diff --check npx gitnexus detect-changes --scope all ``` -如果修改了 PHP 后端文件,补充运行相关 PHP 语法检查或项目脚本;如果修改了前端,按影响端运行对应的类型检查或构建。发版前按上线检查清单执行 `server-api/tools/release_audit.php`、`server-api/tools/smoke_check.php` 和相关客户端构建。 +如果修改了 PHP 后端文件,补充运行相关 PHP 语法检查或项目脚本;如果修改了前端,按影响端运行对应的类型检查或构建。正式包发版前按上线检查清单执行 `server-api/tools/release_audit.php`、`server-api/tools/smoke_check.php` 和相关客户端构建;测试包构建前确认各端测试环境配置指向 `https://test.api.anxinjianyan.com`。 -发布包生成后保留在本地 `releases/` 目录并按需另行交付;Git 提交中不包含 release 包。 +正式包生成后保留在本地 `releases/` 目录,测试包生成后保留在本地 `releases_dev/` 目录,并按需另行交付;Git 提交中不包含这些产物。 ## 发版流程 diff --git a/user-app/.env.test b/user-app/.env.test index 06ee918..0fdb047 100644 --- a/user-app/.env.test +++ b/user-app/.env.test @@ -1,3 +1,3 @@ -VITE_API_BASE_URL=https://test-api.example.com +VITE_API_BASE_URL=https://test.api.anxinjianyan.com VITE_APP_ENV=test VITE_APP_TITLE=安心验 diff --git a/user-app/package.json b/user-app/package.json index 146f264..c59a9ae 100644 --- a/user-app/package.json +++ b/user-app/package.json @@ -19,7 +19,9 @@ "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei", "dev:quickapp-webview-union": "uni -p quickapp-webview-union", "build:custom": "uni build -p", + "build:custom:test": "uni build --mode test -p", "build:h5": "uni build", + "build:h5:test": "uni build --mode test", "build:h5:ssr": "uni build --ssr", "build:mp-alipay": "uni build -p mp-alipay", "build:mp-baidu": "uni build -p mp-baidu", diff --git a/work-app/.env.test b/work-app/.env.test new file mode 100644 index 0000000..77f1583 --- /dev/null +++ b/work-app/.env.test @@ -0,0 +1,3 @@ +VITE_API_BASE_URL=https://test.api.anxinjianyan.com +VITE_APP_ENV=test +VITE_APP_TITLE=安心验作业端 diff --git a/work-app/package.json b/work-app/package.json index 2d270a0..f0d2b4c 100644 --- a/work-app/package.json +++ b/work-app/package.json @@ -19,7 +19,9 @@ "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei", "dev:quickapp-webview-union": "uni -p quickapp-webview-union", "build:custom": "uni build -p", + "build:custom:test": "uni build --mode test -p", "build:h5": "uni build", + "build:h5:test": "uni build --mode test", "build:h5:ssr": "uni build --ssr", "build:mp-alipay": "uni build -p mp-alipay", "build:mp-baidu": "uni build -p mp-baidu",