Skip to content

Commit 3d05740

Browse files
committed
Merge origin/main into claude/issue-6383-connector-jsdoc-retirement-drift
main 侧增量(#6471)仅动 scripts/,不触 content/docs/references/** 与 packages/spec/src,故无 #6224 陈旧组合风险,无需重生成。
2 parents d095146 + 82bf47b commit 3d05740

3 files changed

Lines changed: 453 additions & 22 deletions

File tree

scripts/bump-objectui.sh

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
# Assumes sibling layout:
2525
# ~/work/objectui
2626
# ~/work/objectstack ← run from here
27+
# --help ends here
28+
#
29+
# ^ SENTINEL, not prose — `--help` prints from the shebang down to the line above
30+
# and stops there, so the terminator travels with the text it terminates. Add or
31+
# remove header lines freely; no line number tracks this block any more (#6425).
32+
# Spell it exactly: the --help branch below refuses to run without it. Everything
33+
# from here down is internal rationale and is NOT user-facing help.
2734
#
2835
# objectui ships @object-ui/console as a static SPA. The framework
2936
# release pipeline reads .objectui-sha, clones objectui at that commit,
@@ -63,10 +70,25 @@ for arg in "$@"; do
6370
--no-commit) NO_COMMIT=1 ;;
6471
--no-changeset) NO_CHANGESET=1 ;;
6572
-h|--help)
66-
# NOTE: this line range is coupled to the header block above (usage → env →
67-
# sibling layout, ending at "run from here"). Editing the header means moving
68-
# it — #5960 added the pin-update step and had to.
69-
sed -n '2,26p' "$0" | sed 's/^# \{0,1\}//'
73+
# The header block above IS the help text, and the `# --help ends here`
74+
# sentinel is what ends it — no line range, so growing the header can no
75+
# longer truncate the help (#6425; #5960 grew it and PR #6421 had to move a
76+
# hand-kept `2,26p`). The leading `2` addresses the shebang, whose position
77+
# is fixed by execve rather than by the header's content, so it cannot drift.
78+
#
79+
# A missing sentinel EXITS 1 rather than running on to EOF: a truncated help
80+
# and a complete one both exit 0 and both print something, which is precisely
81+
# why the old coupling could fail in silence — same lesson as the `head -40`
82+
# this script used to truncate its changeset list with (#4731). Guarded here,
83+
# not at startup: a deleted comment must never stop an actual pin bump.
84+
if ! grep -qxF '# --help ends here' "$0"; then
85+
echo "${0##*/}: the '# --help ends here' sentinel is missing — cannot tell" >&2
86+
echo " where the help text ends. Restore it at the end of the header block." >&2
87+
exit 1
88+
fi
89+
sed -n '2,/^# --help ends here$/p' "$0" \
90+
| grep -vxF '# --help ends here' \
91+
| sed 's/^# \{0,1\}//'
7092
exit 0
7193
;;
7294
*) EXPLICIT_SHA="$arg" ;;

0 commit comments

Comments
 (0)