chore: add post-push hook to auto-refresh kyberforge plugin cache
Installing kyberforge via the holocron marketplace caches the plugin at a specific version. After every push, the marketplace clone and plugin cache need to be refreshed manually — otherwise new skills added since the last install are invisible until the user runs `claude plugin update` manually. Adds a post-push git hook that pulls the holocron marketplace clone and updates the kyberforge cache automatically after every push, eliminating the manual refresh step. ## Implementation Notes - `scripts/git-hooks/post-push` is the canonical source; `install.sh` now copies all files in `scripts/git-hooks/` into `.git/hooks/` on fresh checkouts, making the pattern extensible for future hooks. - Hook exits 0 on all failures (warns to stderr) — a stale cache refresh never blocks a completed push. - 11 bats tests cover both the hook and the install.sh copy block, using mocked binaries and a temp-tree fixture to avoid touching real state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P87CiC58Ru2PPWYTeXtjHT
This commit is contained in:
@@ -62,6 +62,18 @@ for adapter in "${SKILL_ADAPTERS[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Install git hooks into the current repo checkout
|
||||
HOOKS_SRC="$REPO_ROOT/scripts/git-hooks"
|
||||
if [[ -d "$HOOKS_SRC" ]]; then
|
||||
for hook_file in "$HOOKS_SRC"/*; do
|
||||
[[ -f "$hook_file" ]] || continue
|
||||
hook_name="$(basename "$hook_file")"
|
||||
dest_hook="$REPO_ROOT/.git/hooks/$hook_name"
|
||||
cp "$hook_file" "$dest_hook"
|
||||
chmod +x "$dest_hook"
|
||||
done
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Deployed:"
|
||||
for entry in "${DEPLOY_FILES[@]}" "${DEPLOY_EXECUTABLES[@]}"; do
|
||||
|
||||
Reference in New Issue
Block a user