#!/bin/zsh # ============================================================================= # Project : modelmap # File : site/sync-content.sh # Purpose : Snapshot the research repo into site/content/ + build-info.json # Author : Simon-Pierre Boucher # Contact : contact@spboucher.ai # Website : https://modelmap.io # Created : 2026-08-12 # Modified : 2026-08-12 # Platform : macOS / Apple Silicon (arm64) # License : All rights reserved (research code) # ============================================================================= set -euo pipefail REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" CONTENT="$REPO_ROOT/site/content" mkdir -p "$CONTENT" # NOTE: rsync applies filters in order — excludes MUST precede the broad # includes, or large binary artifacts (activation dumps, zarr stores) slip in. rsync -a --delete \ --exclude='*.bin' --exclude='*.log' --exclude='__pycache__' --exclude='.git' \ --exclude='node_modules' --exclude='site' --exclude='*.zarr' --exclude='activations' \ --include='CLAUDE.md' --include='README.md' --include='CITATION.cff' \ --include='Makefile' --include='pyproject.toml' \ --include='research/***' --include='experiments/***' --include='benchmarks/***' \ --include='src/***' --include='tools/***' --include='results/***' \ --include='atlas/***' --include='docs/***' --include='publications/***' \ --exclude='*' \ "$REPO_ROOT/" "$CONTENT/" COMMIT=$(git -C "$REPO_ROOT" rev-parse HEAD 2>/dev/null || echo "unknown") COMMITS=$(git -C "$REPO_ROOT" rev-list --count HEAD 2>/dev/null || echo 0) cat > "$CONTENT/build-info.json" <