summaryrefslogtreecommitdiffhomepage
path: root/script/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'script/hooks')
-rwxr-xr-xscript/hooks19
1 files changed, 19 insertions, 0 deletions
diff --git a/script/hooks b/script/hooks
new file mode 100755
index 000000000..ea42297ae
--- /dev/null
+++ b/script/hooks
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ ! -d ".git" ]; then
+ exit 0
+fi
+
+mkdir -p .git/hooks
+
+cat > .git/hooks/pre-push << 'EOF'
+#!/bin/sh
+# Ensure dependencies are installed before typecheck
+if command -v bun >/dev/null 2>&1; then
+ bun install >/dev/null 2>&1 || true
+fi
+bun run typecheck
+EOF
+
+chmod +x .git/hooks/pre-push
+echo "✅ Pre-push hook installed"