Files
audit-platform/docs/Git仓库初始化指南.md
T
guwangtu b91954df4a
CI / check (push) Failing after 15m48s
chore: initial open-source baseline v1.0.0
Signed-off-by: 南通一次元科技有限公司 <guwangtu@icimeta.com>
2026-12-05 15:44:53 +00:00

61 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Git 仓库初始化指南
当前项目还没有 Git 仓库。建议先在内部建仓,再发布到 Gitea/GitHub/Gitee。
## 一、生成干净源码包
```powershell
python deploy/准备开源源码包.py --version 1.0.0
```
产物:
- `dist/医院智能审计管理平台-v1.0.0-src.zip`
- `dist/SHA256SUMS.txt`
脚本会自动扫描服务器 IP、固定口令、私钥、API Key、数据库/上传文件,发现则中止。
## 二、初始化为 Git 仓库
解压源码包后,在仓库根目录执行:
```bash
git init -b main
git config user.name "你的名字"
git config user.email "你的邮箱"
git add .
git commit -s -m "chore: initial open-source baseline v1.0.0"
```
> `-s` 会加入 DCO 签名,表示你确认有权提交这些代码。
## 三、推送到 Gitea/Forgejo
```bash
git remote add origin http://your-git-server/upstream/audit-platform.git
git push -u origin main
git tag -a v1.0.0 -m "v1.0.0"
git push origin v1.0.0
```
建议组织:
```
upstream/audit-platform 官方基线(受保护分支 main)
hospitals/<医院名>/audit-platform 医院 fork
```
## 四、保护与 CI
- `main` 分支保护:禁止直接 push,必须 PR + 评审 + CI
- CI 必跑:`python deploy/自检.py`、`python deploy/冒烟测试.py`
- 发布 tag 必须签名(GPG/SSH)
- 开启依赖漏洞扫描与 secrets 扫描
## 五、发布前
1. 完成 `docs/开源合规清单.md`(PyMuPDF 必须处理)
2. 确认仓库无真实医院数据与密钥
3. 生成 SBOM 与 SHA256
4. 准备首个 release 说明