Files
Agent-Native/scripts/submodule-consistency.sh
T
weichenandCursor e65c6ba604 Align execution errors with the shared catalog and add optional logs.
Contract codes now use the agent.* values, and runtime can emit structured logs without changing results when no logger is configured.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 14:24:11 +00:00

23 lines
673 B
Bash
Executable File

#!/bin/sh
# 核对本仓 gitlink 与已检出子模块 HEAD 是否一致。
# 嵌套副本是否与消费方自己的 deps 相同,由消费方仓库的同名脚本比较。
set -eu
cd "$(dirname "$0")/.."
fail=0
for path in deps/development-guidelines deps/error-code-system deps/logging-system; do
if [ ! -e "$path/.git" ]; then
echo "missing submodule checkout: $path" >&2
fail=1
continue
fi
recorded=$(git rev-parse ":$path")
actual=$(git -C "$path" rev-parse HEAD)
if [ "$recorded" != "$actual" ]; then
echo "gitlink mismatch: $path recorded=$recorded HEAD=$actual" >&2
fail=1
else
echo "ok $path $recorded"
fi
done
exit "$fail"