Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/cn-mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ fallback is a plain-string url (upstream release only) — lint imposes no mirro
- Existing precedent: `pkgs/t/tensorvia-cpu.lua` (a user's own mcpp library, no CN mirror, a single upstream string
url on all three platforms).
- Later, once access is granted or a maintainer supplies the mirror, that version's `url` can be rewritten into a
`{ GLOBAL=…, CN=… }` table (the sha256 stays the same).
`{ GLOBAL=…, CN=… }` table (the sha256 stays the same). The version entry then takes the next `revision` with a
numbered comment (`-- 1: added CN mirror (gitcode mcpp-res); payload byte-identical, sha256 unchanged.`): the
update guard refuses a published version whose url changes without one.

If you need to express "GLOBAL and CN both point at upstream", use the single-string form above rather than a
`{ GLOBAL=x, CN=x }` table (which cannot pass the "CN must point at gitcode" lint check).
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/cn-mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ lint 对纯字符串 url 不施加镜像约束:

- CN 用户将回退至上游源,访问较慢但功能不受影响。
- 既有先例:`pkgs/t/tensorvia-cpu.lua`(用户自有 mcpp 库,无 CN 镜像,三平台均使用上游单一字符串 url)。
- 后续在获得权限、或由维护者补充镜像后,可将该版本的 `url` 改写为 `{ GLOBAL=…, CN=… }` 表(sha256 保持不变)。
- 后续在获得权限、或由维护者补充镜像后,可将该版本的 `url` 改写为 `{ GLOBAL=…, CN=… }` 表(sha256 保持不变)。该版本条目同时取下一个 `revision` 并附编号注释(`-- 1: added CN mirror (gitcode mcpp-res); payload byte-identical, sha256 unchanged.`):已发布版本的 url 改变而不带 revision,更新守卫会拒绝。

如需表达“GLOBAL 与 CN 均指向上游”,应采用上述单一字符串写法,而不应写成 `{ GLOBAL=x, CN=x }` 表(其无法通过
“CN 必须指向 gitcode”的 lint 检查)。
Expand Down
8 changes: 6 additions & 2 deletions pkgs/c/cmdline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ package = {
sha256 = "2b84d9681e392243be42d20340d0cc3fc7fcf7f3a153260136f52c12054a7e7b",
},
["0.3.0"] = {
-- No CN mirror yet: a plain-string url (see docs/cn-mirror.md).
url = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.3.0.tar.gz",
url = {
GLOBAL = "https://github.com/mcpplibs/cmdline/archive/refs/tags/v0.3.0.tar.gz",
CN = "https://gitcode.com/mcpp-res/cmdline/releases/download/0.3.0/cmdline-0.3.0.tar.gz",
},
sha256 = "b30026156e321b15720d8f1deaa7310ed83dbfbe0cbbc4b3ad15368fd8a9fc42",
-- 1: added CN mirror (gitcode mcpp-res); payload byte-identical, sha256 unchanged.
revision = 1,
},
},
macosx = { ref = "linux" },
Expand Down
8 changes: 6 additions & 2 deletions pkgs/x/xpkg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ package = {
xpm = {
linux = {
["0.0.68"] = {
-- No CN mirror yet: a plain-string url (see docs/cn-mirror.md).
url = "https://github.com/openxlings/libxpkg/archive/refs/tags/0.0.68.tar.gz",
url = {
GLOBAL = "https://github.com/openxlings/libxpkg/archive/refs/tags/0.0.68.tar.gz",
CN = "https://gitcode.com/mcpp-res/xpkg/releases/download/0.0.68/xpkg-0.0.68.tar.gz",
},
sha256 = "c069ff9ab280d42a8edbe00b4d9f1a7f3377d6d9bbf781e00efa52ddb4e7861d",
-- 1: added CN mirror (gitcode mcpp-res); payload byte-identical, sha256 unchanged.
revision = 1,
},
["0.0.61"] = {
url = {
Expand Down
Loading