Files
iOSBuildServer/CLAUDE.md
T
shenleiandClaude Opus 5 21542c88d7 feat: 版本号按分支轨道分开管理,版本号配置收归管理员
master/develop 共用 release 轨(App_Store 打包构建号自增),feature 分支走
feature 轨(构建号永不自增,始终使用手填值),两条轨道的 App_Ver 各自独立。

- versions 改为 tracks 结构,旧的单轨/单值配置在加载时自动迁移进 release 轨
- 新增 config["branch_track"] 记录分支归属,缺省按分支名推断,可在分支管理页改
- 新增 PUT /api/config/branches/track;分支名含 / 时走请求体而非路径参数
- 修复 DELETE /api/config/branches/{name} 无法删除含 / 的分支(405)
- 版本号接口不再对普通用户开放,打包设置页整页改为管理员可见

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 17:56:10 +09:00

37 lines
1.7 KiB
Markdown

# iOS Build Server
FastAPI + Vue 3 iOS app auto-packaging service. Supports Ad_Hoc and App_Store builds with web UI, real-time logs, multi-user auth, and health monitoring.
## Tech Stack
- **Backend**: Python 3.9+, FastAPI, SQLAlchemy (SQLite), JWT auth
- **Frontend**: Vue 3, Vite, Vue Router
- **Tests**: pytest (backend), vitest (frontend)
- **Deploy**: macOS launchd, deploy.sh management script
## Key Commands
```bash
./start.sh # Dev mode (backend + frontend hot reload)
./deploy.sh build # Install deps + build frontend
./deploy.sh start/stop/restart/status
./deploy.sh test # Run all tests (backend + frontend)
```
## Architecture
- `backend/routers/` — API routes: auth, users, config, apps, tasks
- `backend/services/` — build_service (packaging), build_queue (async queue), log_streamer (WebSocket)
- `backend/deps.py` — JWT auth dependency used by all protected routes
- `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-track: `release` (master/develop, build number auto-increments on App_Store) and `feature` (self-test, never increments); each branch's track lives in `config["branch_track"]`
## 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*`
- Config stored in `config.json` (apps/schemes/servers), `.env` (infra), SQLite `build_config` table (build settings)
- Chinese UI and documentation throughout