feat: 支持多项目打包
- config.json 改为按项目存储(projects.<id>),上传配置全局共用;旧单项目配置自动迁移为 readoor
- 新增项目管理(管理员):Git 仓库/凭据、源码目录、Xcode 工程、拷贝条目、配置替换方式、自定义字段、替换规则
- 通用配置替换:pbxproj 版本号与签名,patch_rules 支持 define / replace_line 及 ${app.X}、${server.X} 模板
- 请求通过 X-Project 头选择项目;打包任务记录 project_id,历史按项目过滤
- 前端顶部切换项目,App/服务器环境表单按项目显示字段
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2bd5c7057f
commit
8f2f23682f
@@ -26,12 +26,13 @@ FastAPI + Vue 3 iOS app auto-packaging service. Supports Ad_Hoc and App_Store bu
|
||||
- `backend/config.py` — loads .env, defines all config constants
|
||||
- `frontend/src/views/` — BuildView, HistoryView, ConfigView
|
||||
- `config.json` — runtime config (apps, schemes, servers, upload, branches, versions) managed via web UI
|
||||
- Versions are per-branch: every branch owns a track in `config["versions"]["tracks"]`, named after the branch (master/main keeps the historical name `release`); `config["branch_track"]` maps branch → track name, and each track's `kind` is `release` (build number auto-increments on App_Store) or `feature` (never increments)
|
||||
- Multi-project: `config.json` is `{"projects": {pid: {definition + data}}, "upload": {...}}`; `backend/projects.py` holds project definitions (git, source_dir, xcode, copy_items, patcher `readoor`/`generic`, patch_rules, app_fields/server_fields, obfuscation). Requests pick the project via `X-Project` header (or `?project=`), bound in a ContextVar by middleware; `load_config()` returns the current project's data plus `upload` and `_project`. Legacy flat config auto-migrates to project `readoor` (uses `.env` Git settings). Tasks store `project_id`; build dirs are `build_{pid}_{task_id}`
|
||||
- Versions are per-branch (within each project): every branch owns a track in `config["versions"]["tracks"]`, named after the branch (master/main keeps the historical name `release`); `config["branch_track"]` maps branch → track name, and each track's `kind` is `release` (build number auto-increments on App_Store) or `feature` (never increments)
|
||||
- Tags are buildable refs too: `config["tags"]` (names never collide with branches), tracked in `branch_track` like branches (default kind `release`); tasks store the name in `branch` plus `ref_type` (`branch`/`tag`), and tag builds check out `refs/tags/<tag>` detached
|
||||
|
||||
## Conventions
|
||||
|
||||
- All backend routes require JWT auth except `/api/auth/login` and `/api/health`
|
||||
- Admin-only routes: user management (`/api/users/*`) and all of `/api/config/*` except `/api/config/apps*`
|
||||
- Admin-only routes: user management (`/api/users/*`) and all of `/api/config/*` except `/api/config/apps*` (incl. project CRUD `/api/config/projects*`); `GET /api/projects` is the public project list for any logged-in user
|
||||
- Config stored in `config.json` (apps/schemes/servers), `.env` (infra), SQLite `build_config` table (build settings)
|
||||
- Chinese UI and documentation throughout
|
||||
|
||||
Reference in New Issue
Block a user