feat: 添加 macOS/Linux 跨平台部署与更新支持 - #2
Open
Jimmy-xuzimo wants to merge 1 commit into
Open
Conversation
- 新增 setup.sh、start-system.sh、stop-system.sh 部署引导脚本 - 新增 update-system.sh 受控更新执行器,扩展 launch_update_runner 支持非 Windows 平台 - 新增 setup/start/stop-project-ai.sh 本地 AI 运行时脚本(适配 Intel/Apple Silicon) - 移除在线更新器仅支持 Windows 的硬限制
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
为项目增添 macOS/Linux 跨平台部署与更新支持,在不改变现有 Windows 功能的前提下补齐以下能力:
setup.sh、start-system.sh、stop-system.shupdate-system.sh+ 扩展launch_update_runner支持非 Windows 平台setup/start/stop-project-ai.sh,适配 Intel / Apple Silicon改动清单
修改
app/services/updates.py:launch_update_runner去除 Windows 硬限制,按平台选择执行器;同步更新模块 docstring新增(7 个
.sh脚本)setup.sh/start-system.sh/stop-system.shscripts/update-system.shscripts/setup-project-ai.sh/scripts/start-project-ai.sh/scripts/stop-project-ai.sh兼容性设计
.bat/.ps1逻辑原样保留,os.name == "nt"分支不变nohup、lsof、curl、shasum、unzip等 POSIX 标准工具,无 CPU 架构相关代码recover-interrupted-update.py完全兼容测试环境
测试用例与结果
1. 单元与集成测试
pytest -q:92 passed2. 发布安全审计
scripts/audit_public_source.py:70 文件通过scripts/audit_public_source.py --runtime:62 文件通过3. 脚本语法
.sh全部通过bash -n语法检查4. 部署引导脚本
setup.sh:生成.env、初始化数据库、正确识别 AI 降级 ✅start-system.sh/stop-system.sh:启动 / 停止 / 重复启动去重 / PID 管理 ✅5. 在线更新(端到端)
6. 本地 AI
说明
本次未在 Apple Silicon(高配 Mac)上实测;改动均为纯 POSIX Shell + 纯 Python,无架构相关代码,功能行为与架构无关(Apple Silicon 下 AI 推理走 Metal,性能更优)。