跳到主要内容

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

提交记录
修改release.sh+10 −4看文件
@@ -5,6 +5,7 @@
55# ./release.sh X.Y.Z check, then tag, push and publish
66# ./release.sh X.Y.Z --dry-run run every check, change nothing
77# ./release.sh X.Y.Z --yes no confirmation prompt
8新增:# ./release.sh X.Y.Z --bypass-checks without waiting for the test workflow
89# ./release.sh notes X.Y.Z print that version's CHANGELOG.md section
910#
1011# It bumps and commits nothing. First, in an ordinary commit on main: set
@@ -40,7 +41,7 @@ warn() { printf '%s!%s %s\n' "$c_y" "$c_0" "$*"; }
4041die() { printf '%s✗%s %s\n' "$c_r" "$c_0" "$*" >&2; exit 1; }
4142
4243usage() {
43删除: sed -n '5,8p' "$0" | sed 's/^# \{0,1\}//' >&2
44新增: sed -n '5,9p' "$0" | sed 's/^# \{0,1\}//' >&2
4445 exit 2
4546}
4647
@@ -88,11 +89,12 @@ fi
8889VERSION="$1"; shift
8990valid_version "$VERSION" || die "not a version: '$VERSION' (expected X.Y.Z)"
9091TAG="v$VERSION"
91删除:DRY_RUN=""; ASSUME_YES=""
92新增:DRY_RUN=""; ASSUME_YES=""; BYPASS_CHECKS=""
9293while [ $# -gt 0 ]; do
9394 case "$1" in
9495 --dry-run) DRY_RUN=1 ;;
9596 --yes) ASSUME_YES=1 ;;
97新增: --bypass-checks) BYPASS_CHECKS=1 ;;
9698 *) usage ;;
9799 esac
98100 shift
@@ -176,12 +178,16 @@ ok "CHANGELOG.md has a $VERSION section ($(printf '%s\n' "$NOTES" | wc -l | tr -
176178
177179# --- 3. tests ------------------------------------------------------------------
178180# CI is the authority: it runs bash 3.2, which this machine may lack.
181新增:# --bypass-checks skips the workflow only: the checks above decide what the
182新增:# tag and the release are, and still apply.
179183echo "Checking the tests"
180184ci="skipped"
181删除:[ -z "$GH" ] || ci="$(gh run list --workflow test.yml --commit "$head" --limit 1 \
185新增:[ -z "$GH" ] || [ -n "$BYPASS_CHECKS" ] || ci="$(gh run list --workflow test.yml --commit "$head" --limit 1 \
182186 --json status,conclusion --jq '.[0] | "\(.status) \(.conclusion)"' 2>/dev/null || true)"
183187case "$ci" in
184删除: skipped) warn "the test workflow on ${head:0:12} was not checked (no gh)" ;;
188新增: skipped)
189新增: if [ -n "$BYPASS_CHECKS" ]; then warn "the test workflow on ${head:0:12} was not checked (--bypass-checks)"
190新增: else warn "the test workflow on ${head:0:12} was not checked (no gh)"; fi ;;
185191 "completed success") ok "the test workflow passed on ${head:0:12}" ;;
186192 "") die "no test workflow run for ${head:0:12}: push and wait for CI" ;;
187193 completed*) die "the test workflow did not pass on ${head:0:12} ($ci)" ;;
修改tests/16-setup.sh+11 −1看文件
@@ -95,7 +95,7 @@ if command -v git >/dev/null 2>&1; then
9595 cat > "$RB/gh" <<STUB
9696#!/bin/sh
9797case "\$1 \$2" in
98删除: "run list") echo "completed success" ;;
98新增: "run list") echo "\${REL_CI:-completed success}" ;;
9999 "release view") [ -e "$SB/rel-released" ] ;;
100100 "repo view") echo "o/r" ;;
101101esac
@@ -119,6 +119,16 @@ STUB
119119 case "$(AGENT_VM_TAP="$SB/no-tap" relrun)" in *"Checking the repository"*) fail "release.sh: the formula is checked after the repository" ;; *) pass "release.sh: a missing formula stops it first" ;; esac ;;
120120 *) fail "release.sh: missing formula: $(AGENT_VM_TAP="$SB/no-tap" relrun)" ;;
121121 esac
122新增: # A failed workflow stops the run; --bypass-checks goes on, saying so.
123新增: case "$(REL_CI="completed failure" relrun; echo "rc=$?")" in
124新增: *"did not pass"*"rc=1") pass "release.sh: a failed test workflow stops it" ;;
125新增: *) fail "release.sh: failed workflow: $(REL_CI="completed failure" relrun)" ;;
126新增: esac
127新增: out="$( cd "$RR" && REL_CI="completed failure" PATH="$RB:$PATH" bash ./release.sh "$AGENT_VM_VERSION" --dry-run --bypass-checks 2>&1 )"
128新增: case "$out" in
129新增: *"not checked (--bypass-checks)"*"dry run complete"*) pass "release.sh --bypass-checks: the workflow is skipped, with a warning" ;;
130新增: *) fail "release.sh --bypass-checks: $out" ;;
131新增: esac
122132 touch "$SB/rel-released"
123133 case "$(relrun)" in *"tag v$AGENT_VM_VERSION already exists"*) pass "release.sh: a released tag is still refused" ;; *) fail "release.sh: a released tag was not refused" ;; esac
124134 # The tag made here but never pushed: resumed too, and pushed before the