fix(sync): deploy to last30daysCROSS with patched frontmatter
- Add CROSS to sync targets with sed-patched name/version/description - Switch cp to rsync to handle identical file edge case on APFS - CROSS SKILL.md gets last30daysCROSS skill root injected into search path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+17
-8
@@ -8,6 +8,7 @@ echo "Source: $SRC"
|
|||||||
|
|
||||||
TARGETS=(
|
TARGETS=(
|
||||||
"$HOME/.claude/skills/last30days"
|
"$HOME/.claude/skills/last30days"
|
||||||
|
"$HOME/.claude/skills/last30daysCROSS"
|
||||||
"$HOME/.agents/skills/last30days"
|
"$HOME/.agents/skills/last30days"
|
||||||
"$HOME/.codex/skills/last30days"
|
"$HOME/.codex/skills/last30days"
|
||||||
)
|
)
|
||||||
@@ -17,24 +18,32 @@ for t in "${TARGETS[@]}"; do
|
|||||||
echo "--- Syncing to $t ---"
|
echo "--- Syncing to $t ---"
|
||||||
mkdir -p "$t/scripts/lib"
|
mkdir -p "$t/scripts/lib"
|
||||||
|
|
||||||
# SKILL.md
|
# SKILL.md — CROSS gets patched frontmatter + skill root, others get verbatim copy
|
||||||
|
if [[ "$t" == *"last30daysCROSS"* ]]; then
|
||||||
|
sed \
|
||||||
|
-e 's/^name: last30days$/name: last30daysCROSS/' \
|
||||||
|
-e 's/^version: "2\.1"/version: "2.2-cross"/' \
|
||||||
|
-e "s|^description: .*|description: \"TEST BUILD with outcome-aware Polymarket scoring + cross-source linking. Research a topic from the last 30 days. Sources: Reddit, X, YouTube, Hacker News, Polymarket, web.\"|" \
|
||||||
|
-e "s/^argument-hint: .*/argument-hint: 'last30daysCROSS AI video tools'/" \
|
||||||
|
-e 's|"\$HOME/.claude/skills/last30days"|"$HOME/.claude/skills/last30daysCROSS" \\\n "$HOME/.claude/skills/last30days"|' \
|
||||||
|
"$SRC/SKILL.md" > "$t/SKILL.md"
|
||||||
|
else
|
||||||
cp "$SRC/SKILL.md" "$t/"
|
cp "$SRC/SKILL.md" "$t/"
|
||||||
|
fi
|
||||||
|
|
||||||
# Main script
|
# Main script + lib modules (rsync handles identical files gracefully)
|
||||||
cp "$SRC/scripts/last30days.py" "$t/scripts/"
|
rsync -a "$SRC/scripts/last30days.py" "$t/scripts/"
|
||||||
|
rsync -a "$SRC/scripts/lib/"*.py "$t/scripts/lib/"
|
||||||
# All lib modules
|
|
||||||
cp "$SRC/scripts/lib/"*.py "$t/scripts/lib/"
|
|
||||||
|
|
||||||
# Vendor directory (bird-search CLI)
|
# Vendor directory (bird-search CLI)
|
||||||
if [ -d "$SRC/scripts/lib/vendor" ]; then
|
if [ -d "$SRC/scripts/lib/vendor" ]; then
|
||||||
cp -r "$SRC/scripts/lib/vendor" "$t/scripts/lib/"
|
rsync -a "$SRC/scripts/lib/vendor" "$t/scripts/lib/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Fixtures
|
# Fixtures
|
||||||
if [ -d "$SRC/fixtures" ]; then
|
if [ -d "$SRC/fixtures" ]; then
|
||||||
mkdir -p "$t/fixtures"
|
mkdir -p "$t/fixtures"
|
||||||
cp -r "$SRC/fixtures/"* "$t/fixtures/" 2>/dev/null || true
|
rsync -a "$SRC/fixtures/" "$t/fixtures/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Count and report
|
# Count and report
|
||||||
|
|||||||
Reference in New Issue
Block a user