From d3f3db0d144039687562d2423f3041f0d01b9440 Mon Sep 17 00:00:00 2001 From: Florian BRUNIAUX Date: Sun, 18 Jan 2026 18:10:24 +0100 Subject: [PATCH] fix(sync): distinguish guide version from Claude Code version in check The previous regex matched any 'vX.Y.Z' pattern, capturing 'Claude Code v2.1.12' instead of the guide version. Now specifically looks for 'Version X.Y.Z' pattern. Co-Authored-By: Claude Opus 4.5 --- scripts/check-landing-sync.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/check-landing-sync.sh b/scripts/check-landing-sync.sh index fe68078..d79be38 100755 --- a/scripts/check-landing-sync.sh +++ b/scripts/check-landing-sync.sh @@ -28,10 +28,15 @@ if [ ! -d "$LANDING_DIR" ]; then fi # =================== -# 1. VERSION CHECK +# 1. VERSION CHECK (Guide version, not Claude Code version) # =================== GUIDE_VERSION=$(cat "$GUIDE_DIR/VERSION" | tr -d '\n') -LANDING_VERSION=$(grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' "$LANDING_DIR/index.html" | head -1 | sed 's/v//') +# Look for guide version pattern (e.g., "Version 3.8.2" or "v3.8.2" in footer, not "Claude Code vX.Y.Z") +LANDING_VERSION=$(grep -oE 'Version [0-9]+\.[0-9]+\.[0-9]+' "$LANDING_DIR/index.html" | head -1 | sed 's/Version //') +# Fallback: try footer pattern if Version not found +if [ -z "$LANDING_VERSION" ]; then + LANDING_VERSION=$(grep -E 'footer|Footer' -A5 "$LANDING_DIR/index.html" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1) +fi echo -e "${BLUE}1. Version${NC}" echo " Guide: $GUIDE_VERSION"