summaryrefslogtreecommitdiffhomepage
path: root/script/hooks
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-31 01:25:24 -0400
committerDax Raad <[email protected]>2025-07-31 01:25:24 -0400
commit2d9ed06367516daa184ecf70bb0b2451c06da8d1 (patch)
treee735b78999853aa52d77240a4be7d32e0d09556e /script/hooks
parent50be2aee39289b7e05299e61d53478736ab914cc (diff)
downloadopencode-2d9ed06367516daa184ecf70bb0b2451c06da8d1.tar.gz
opencode-2d9ed06367516daa184ecf70bb0b2451c06da8d1.zip
ci: scripts
Diffstat (limited to 'script/hooks')
-rwxr-xr-xscript/hooks15
1 files changed, 15 insertions, 0 deletions
diff --git a/script/hooks b/script/hooks
new file mode 100755
index 000000000..4597c6f41
--- /dev/null
+++ b/script/hooks
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if [ ! -d ".git" ]; then
+ exit 0
+fi
+
+mkdir -p .git/hooks
+
+cat > .git/hooks/pre-push << 'EOF'
+#!/bin/sh
+bun run typecheck
+EOF
+
+chmod +x .git/hooks/pre-push
+echo "✅ Pre-push hook installed"