Skip to content

feat: 支持 Gitee 一键安装并补充双平台部署文档 - #17

Merged
raphael2025 merged 1 commit into
mainfrom
feat/gitee-oneclick-20261101
Nov 1, 2026
Merged

raphael2025 merged 1 commit into
mainfrom
feat/gitee-oneclick-20261101

Conversation

@raphael2025

@raphael2025 raphael2025 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

背景

用户需要继续复制一条命令完成安装,并可选择 GitHub 或 Gitee。仅替换脚本下载地址会让程序源码仍从 GitHub 获取;Gitee 的普通归档下载入口当前返回 HTML 页面,不能直接当压缩包解压。

变更

  • Ubuntu 增加 --source github|gitee / ANTMONITOR_SOURCE,Gitee 模式自动准备 Git,并从 Gitee 安装和更新。
  • 不指定来源时保留已有 origin;显式选择仅自动切换官方 origin,自定义仓库得到保护。旧源码包安装可迁移到 Gitee Git 部署并保留配置。
  • Gitee 下载失败明确停止;GitHub 原有源码包兜底保留;拉取失败不再继续报更新成功。
  • Windows 增加 -Source gitee,使用系统 Git 克隆并保留 origin;GitHub ZIP 方式保持兼容。Gitee Windows 入口需要预装 Git。
  • README 和中文指南并列提供两平台的一键安装、云端接入与更新命令,保留 Ubuntu 无桌面访问说明。

验证

  • 新增安装器隔离测试: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 镜像,也没有执行生产安装或重启服务。

@cursor

cursor Bot commented Nov 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T13:57:44.876597Z 88cc896 PR opened
🔒 Security Review ✅ Completed 2026-11-01T13:58:35.117960Z 88cc896 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread install.sh
Comment on lines +367 to +369
elif [[ -f "$INSTALL_DIR/server.py" && -n "$ARCHIVE_URL" ]]; then
# GitHub 源码包安装继续用源码包;显式 Gitee / 自定义 Git 源走下方克隆路径,
# 让旧的无 .git 安装也能切换来源并获得后续 Git 更新能力。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@raphael2025
raphael2025 merged commit e038014 into main Nov 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant