Repository navigation
feat: 支持 Gitee 一键安装并补充双平台部署文档 - #17
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 957c1613-2185-4898-b4e5-f51cbc78adf9) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88cc896a07
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| elif [[ -f "$INSTALL_DIR/server.py" && -n "$ARCHIVE_URL" ]]; then | ||
| # GitHub 源码包安装继续用源码包;显式 Gitee / 自定义 Git 源走下方克隆路径, | ||
| # 让旧的无 .git 安装也能切换来源并获得后续 Git 更新能力。 |
There was a problem hiding this comment.
Install Git before migrating archive deployments during updates
For an existing GitHub archive installation without Git (a supported outcome when the original installer could not install Git), the documented update --source gitee command cannot migrate the installation. do_update() calls sync_code() without calling ensure_packages(), so this new routing skips the archive-update path, skips cloning because Git is absent, and exits through the empty-archive guard in fetch_tarball(). Prepare Git during this update transition as well, so the advertised automatic Gitee migration does not require a separate manual installation.
Useful? React with 👍 / 👎.
背景
用户需要继续复制一条命令完成安装,并可选择 GitHub 或 Gitee。仅替换脚本下载地址会让程序源码仍从 GitHub 获取;Gitee 的普通归档下载入口当前返回 HTML 页面,不能直接当压缩包解压。
变更
--source github|gitee/ANTMONITOR_SOURCE,Gitee 模式自动准备 Git,并从 Gitee 安装和更新。-Source gitee,使用系统 Git 克隆并保留 origin;GitHub ZIP 方式保持兼容。Gitee Windows 入口需要预装 Git。验证
新增安装器隔离测试:23 项全部通过,覆盖来源选择、官方换源、fork 保护、旧源码包迁移及失败处理;不调用真实 apt/systemd。
bash -n install.sh、文档 Bash 示例及差异空白检查通过。实际读取 Gitee raw 安装脚本并成功克隆 main,核对与当前 GitHub 主分支一致。
Windows 路径通过本地 Git/现有 bootstrap 行为验证;PowerShell 文件保持 ASCII + CRLF。本环境没有 PowerShell,未进行原生 Windows 安装测试。
GitHub Windows startup 工作流 已成功:7 个任务全部通过,包含 Python 3.8/3.10/3.12/3.14 启动与回归测试、无 Python 安装、Python 3.15 恢复、ZIP 转 Git。
发布注意
请将合并后的同一版本同步到 Gitee 的 main 分支,再使用文档中的新
--source/-Source命令。此 PR 不会自动配置 GitHub→Gitee 镜像,也没有执行生产安装或重启服务。