opencode_offline/scripts/hooks

16 lines
206 B
Plaintext
Raw Normal View History

2025-06-19 12:20:03 +08:00
#!/bin/bash
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"