summaryrefslogtreecommitdiffhomepage
path: root/script/hooks
diff options
context:
space:
mode:
authorKevin King <[email protected]>2025-10-28 19:32:45 -0400
committerGitHub <[email protected]>2025-10-28 18:32:45 -0500
commit0e60f666043910afb96e9de2f84b0b8a68c7e4d6 (patch)
tree6ca20af712e2faca6262f029d6d8499c9888eb50 /script/hooks
parentfc8db6cdf9cb81e29c5dda69c8646aa52e453a9c (diff)
downloadopencode-0e60f666043910afb96e9de2f84b0b8a68c7e4d6.tar.gz
opencode-0e60f666043910afb96e9de2f84b0b8a68c7e4d6.zip
ignore: python sdk (#2779)
Co-authored-by: Aiden Cline <[email protected]>
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"