feat: CN 资源镜像 (mcpp-res) + GLOBAL/CN url 表#41
Merged
Conversation
Mirror every package resource to the gitcode `mcpp-res` org and switch
each descriptor's download `url` to a `{ GLOBAL=..., CN=... }` table per
the xpkg V1 spec (resolution priority GLOBAL > CN, so default behavior is
unchanged). Select with `mcpp self config --mirror CN|GLOBAL`.
- 50 resources across 35 mcpp-res repos, each published as a release asset
(https://gitcode.com/mcpp-res/<repo>/releases/download/<ver>/<file>),
byte-identical to the upstream source (same sha256).
- 37 descriptors rewritten (120 url fields).
- validate CI: lint mirror tables (tests/check_mirror_urls.lua) + probe
every CN asset is reachable (mirror-cn-reachable job, tests/list_cn_urls.lua).
- README: document the GLOBAL/CN mirror + mcpp-res org.
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.
概述
为 mcpp-index 的所有包资源增加 CN 镜像机制:在 gitcode 上建立
mcpp-res组织,为每个库创建对应仓库并把资源以 release 资产形式上传,然后把每个包描述的下载url从普通字符串改为{ GLOBAL=..., CN=... }镜像表(遵循 xpkg V1 规范,解析优先级GLOBAL > CN)。sha256)。mcpp self config --mirror CN(透传给 xlings 安装引擎)。镜像规模
mcpp-res仓库,逐个发布为 release 资产:https://gitcode.com/mcpp-res/<库>/releases/download/<版本>/<库>-<版本>.<ext>url字段)。CI 更新
validate / lint:新增tests/check_mirror_urls.lua—— 校验镜像表必须同时含GLOBAL+CN,且 CN 指向gitcode.com/mcpp-res/。validate / mirror-cn-reachable:新增任务,用tests/list_cn_urls.lua提取所有 CN url 并探测每个资产可达。闭环验证
下载全部 50 个 CN url 并与描述文件记录的
sha256比对:50/50 通过(字节级一致)。本地lint+check_mirror_urls.lua全部通过。兼容性
url表是合法 Lua,旧版解析按GLOBAL > CN取 GLOBAL,行为与改动前一致;新增 CN 仅在--mirror CN时生效。