跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

提交记录
修改release.sh+20 −2看文件
@@ -85,7 +85,10 @@ valid_version() {
8585}
8686
8787# The "## X.Y.Z" section of CHANGELOG.md, without its heading and without
88删除:# leading or trailing blank lines. Empty when there is none.
88新增:# leading or trailing blank lines. Empty when there is none. The file is
89新增:# wrapped for reading in a terminal, GitHub is not: a paragraph or list item
90新增:# continued on the next lines is joined into one line. Code fences, headings,
91新增:# tables and quotes are left as written.
8992changelog_notes() {
9093 awk -v v="$1" '
9194 /^## / { if (inside) exit; inside = ($2 == v); next }
@@ -93,7 +96,22 @@ changelog_notes() {
9396 END {
9497 first = 1; while (first <= n && lines[first] ~ /^[ \t]*$/) first++
9598 last = n; while (last >= first && lines[last] ~ /^[ \t]*$/) last--
96删除: for (i = first; i <= last; i++) print lines[i]
99新增: for (i = first; i <= last; i++) {
100新增: l = lines[i]
101新增: if (fence) { print l; if (l ~ /^[ \t]*(```|~~~)/) fence = 0; continue }
102新增: if (l ~ /^[ \t]*(```|~~~)/ || l ~ /^[ \t]*$/) {
103新增: if (joinable) printf "\n"
104新增: print l; joinable = 0; fence = (l ~ /[`~]/); continue
105新增: }
106新增: if (joinable && l !~ /^[ \t]*([-*+]|[0-9]+[.)])[ \t]/ && l !~ /^[ \t]*[#|>]/) {
107新增: sub(/^[ \t]+/, "", l); printf " %s", l; continue
108新增: }
109新增: if (joinable) printf "\n"
110新增: printf "%s", l
111新增: joinable = (l !~ /^[ \t]*[#|>]/)
112新增: if (!joinable) printf "\n"
113新增: }
114新增: if (joinable) printf "\n"
97115 }
98116 ' "$REPO_DIR/CHANGELOG.md"
99117}
修改tests/release.sh+20 −0看文件
@@ -44,6 +44,26 @@ check "notes: only that version's section" "$("$SB/notes/release.sh" notes 2.0.0
4444check "notes: the last section too" "$("$SB/notes/release.sh" notes 1.0.0)" "- one"
4545"$SB/notes/release.sh" notes 3.0.0 >/dev/null 2>&1
4646check "notes: an absent version fails" "$?" "1"
47新增:# Wrapped for the terminal, joined for GitHub: items and paragraphs become one
48新增:# line each, headings, fences, tables and sub-items stay as written.
49新增:printf '# Changelog\n\n## 4.0.0\n\nIntro line one\ncontinued here.\n\n### Added\n\n- first item\n continued\n and again\n- second item\n - sub item\n wrapped\n\n```\nkept\n as is\n```\n\n| a | b |\n|---|---|\n| 1 | 2 |\n\n## 3.0.0\n\n- old\n' > "$SB/notes/CHANGELOG.md"
50新增:want='Intro line one continued here.
51新增:
52新增:### Added
53新增:
54新增:- first item continued and again
55新增:- second item
56新增: - sub item wrapped
57新增:
58新增:```
59新增:kept
60新增: as is
61新增:```
62新增:
63新增:| a | b |
64新增:|---|---|
65新增:| 1 | 2 |'
66新增:check "notes: wrapped lines are joined, the rest is kept" "$("$SB/notes/release.sh" notes 4.0.0)" "$want"
4767"$SELF_DIR/release.sh" 1.2 >/dev/null 2>&1
4868check "a malformed version is refused before anything else" "$?" "1"
4969"$SELF_DIR/release.sh" >/dev/null 2>&1