docs: add version update workflow documentation to development guides

Add comprehensive documentation for the version update process in both English and Chinese development guides:
- Document manifest.json and package.json version synchronization during releases
- Explain update_versions.py script usage with examples (default, --version, --dry-run)
- List all files updated by the script (package.json, manifest.json, pyproject.toml, READMEs)
- Provide guidance on manual tool updates outside release
main
Marcus Sanatan 2026-01-22 16:09:04 -04:00
parent 067eddd1da
commit e73c9c1651
2 changed files with 60 additions and 0 deletions

View File

@ -338,6 +338,36 @@ python3 tools/stress_mcp.py \
4. **迭代** - 按需重复 1-3
5. **Restore** 完成后用 `restore-dev.bat` 恢复原始文件
## 重要说明
### 更新工具和 Manifest
在 Unity 包中添加或修改 MCP 工具时:
- 工具定义位于仓库根目录的 manifest.json 文件中
- 在发布过程中manifest.json 版本会自动与 MCPForUnity/package.json 保持同步
- 如果在发布过程之外手动更新工具,请确保相应更新 manifest.json 版本
- 使用综合版本更新脚本:`python3 tools/update_versions.py` 来同步项目中所有版本引用
`update_versions.py` 脚本会更新:
- MCPForUnity/package.jsonUnity 包版本)
- manifest.jsonMCP bundle manifest
- Server/pyproject.tomlPython 包版本)
- Server/README.md版本引用
- README.md固定版本示例
- docs/i18n/README-zh.md固定版本示例
使用示例:
```bash
# 更新所有文件以匹配 package.json 版本
python3 tools/update_versions.py
# 更新所有文件到指定版本
python3 tools/update_versions.py --version 9.2.0
# 干运行以查看将要更新的内容
python3 tools/update_versions.py --dry-run
```
## Troubleshooting
### 运行 .bat 时出现 "Path not found"

View File

@ -328,6 +328,36 @@ We provide a CI job to run a Natural Language Editing suite against the Unity te
4. **Iterate** - repeat steps 1-3 as needed
5. **Restore** original files when done using `restore-dev.bat`
## Important Notes
### Updating Tools and Manifest
When adding or modifying MCP tools in the Unity package:
- Tool definitions are located in the manifest.json file at the repository root
- The manifest.json version is automatically kept in sync with MCPForUnity/package.json during releases
- If you manually update tools outside of the release process, ensure to update the manifest.json version accordingly
- Use the comprehensive version update script: `python3 tools/update_versions.py` to sync all version references across the project
The `update_versions.py` script updates:
- MCPForUnity/package.json (Unity package version)
- manifest.json (MCP bundle manifest)
- Server/pyproject.toml (Python package version)
- Server/README.md (version references)
- README.md (fixed version examples)
- docs/i18n/README-zh.md (fixed version examples)
Usage examples:
```bash
# Update all files to match package.json version
python3 tools/update_versions.py
# Update all files to a specific version
python3 tools/update_versions.py --version 9.2.0
# Dry run to see what would be updated
python3 tools/update_versions.py --dry-run
```
## Troubleshooting
### "Path not found" errors running the .bat file