Files
pbf/PROJECT_PATH_AND_GIT_PLAN.md
2026-03-17 19:48:15 +08:00

140 lines
2.6 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 接管说明
## 正式项目路径
当前项目的正式工作目录是:
- `/root/sourceserver/pbf`
以后所有相关命令、脚本、VSCode 工作区、日志路径,都应以这个目录为准。
旧路径:
- `/root/weather`
当前已经不是主项目目录,不能再作为构建和审计脚本的启动路径使用。
## 当前状态
已确认以下关键文件都在正式目录中:
- `navsea_tile_builder.py`
- `navsea_render_audit.py`
- `navsea_mapping_registry.py`
- `navsea_mapping_registry_sync.py`
- `tasks/pbf/`
- `src/pbf/`
已确认当前目录还不是 Git 仓库:
- `git rev-parse --is-inside-work-tree` 返回 `NOT_GIT`
## 后续统一约定
以后统一使用:
- 工作目录:`/root/sourceserver/pbf`
- Python 环境:`/root/sourceserver/pbf/.venv`
- 构建日志目录:`/root/sourceserver/pbf/logs`
## 全量工程版构建命令
```bash
mkdir -p /root/sourceserver/pbf/logs
cd /root/sourceserver/pbf
nohup env \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/root/sourceserver/pbf/.venv/lib/python3.12/site-packages \
python3 /root/sourceserver/pbf/navsea_tile_builder.py \
--all-tiles \
--zmin 0 \
--zmax 14 \
--output /home/wwwroot/pbf-engineering-full \
--workers 1 \
--engineering \
--fid-key 'thisMyWorld@2026' \
--fid-key-id navsea-fid-key-v1 \
--bundle-id navsea-core \
> /root/sourceserver/pbf/logs/navsea_full_engineering_build.log 2>&1 &
```
## Git 服务器接管建议
目标服务器:
- `192.168.200.184`
建议流程:
1. 在服务器上先创建空仓库
2. 在本地项目目录初始化 Git
3. 添加 `.gitignore`
4. 首次提交
5. 添加远端并推送
## 推荐命令
### 1. 初始化本地仓库
```bash
cd /root/sourceserver/pbf
git init
```
### 2. 创建主分支
```bash
git branch -M main
```
### 3. 添加远端
如果 Git 服务器上仓库地址是:
- `ssh://git@192.168.200.184/<group>/pbf.git`
则命令为:
```bash
git remote add origin ssh://git@192.168.200.184/<group>/pbf.git
```
如果是 HTTP 地址,则改成对应 URL。
### 4. 首次提交
```bash
git add .
git commit -m "Initial import of NavSea pbf project"
```
### 5. 首次推送
```bash
git push -u origin main
```
## 提交前建议排除的内容
建议不要直接提交这些目录或文件:
- `.venv/`
- `__pycache__/`
- `logs/`
- 大体量生成产物
- 临时输出目录
- 本地缓存
如果准备正式接管 Git建议先补一份 `.gitignore`,再做首次提交。
## 推荐下一步
最稳的顺序是:
1. 以后统一从 `/root/sourceserver/pbf` 工作
2. 先补 `.gitignore`
3. 初始化 Git
4.`192.168.200.184` 上创建空仓库
5. 推送首版代码