# Hook: validate-version
# Description: Check that VERSION file is updated with other changes
FILES=$(git diff --cached --name-only)
if echo "$FILES" | grep -q "guide/"; then
# 如果 guide/ 有变更,VERSION 也必须有变更
if ! echo "$FILES" | grep -q "VERSION"; then
echo "❌ Error: guide/ was modified but VERSION wasn't updated"
echo "Run: echo '3.x.x' > VERSION"