From d7fc47e26029c13b2abc4ff970d7e46c35a40b58 Mon Sep 17 00:00:00 2001 From: allaun Date: Tue, 30 Jun 2026 04:47:18 -0500 Subject: [PATCH] feat: add install-hooks.sh for lake build ingestion post-commit hook - scripts/install-hooks.sh: installs post-commit hook that runs lake_build_ingest.py after each commit (async, non-blocking) - Build results ingested into Postgres on neon-64gb - Also: ii-agent systemd user service on port 8001, Authentik admin setup --- scripts/install-hooks.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/install-hooks.sh diff --git a/scripts/install-hooks.sh b/scripts/install-hooks.sh new file mode 100644 index 00000000..e2f0886a --- /dev/null +++ b/scripts/install-hooks.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# install-hooks.sh — Install the post-commit hook that automates lake build +# ingestion into Postgres. +# +# Run this from the repo root after cloning: +# bash scripts/install-hooks.sh + +HOOKS_DIR="$(git rev-parse --git-dir)/hooks" +cat > "$HOOKS_DIR/post-commit" << 'HOOKEOF' +#!/bin/sh +# Git LFS post-commit hook +command -v git-lfs >/dev/null 2>&1 || { printf >&2 "\n%s\n\n" "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks')."; exit 2; } +git lfs post-commit "$@" + +# Lake build ingestion (async, non-blocking) +# Runs the build and ingests results into Postgres on neon-64gb. +python3 "/home/allaun/Research Stack/4-Infrastructure/shim/lake_build_ingest.py" Compiler --dir /home/allaun/SilverSight --actor opencode >/dev/null 2>&1 & +HOOKEOF +chmod +x "$HOOKS_DIR/post-commit" +echo "Installed post-commit hook in $HOOKS_DIR/post-commit"