Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

feat: add git hooks setup script

Mario604ea303840a
diff --git a/scripts/setup-hooks.sh b/scripts/setup-hooks.sh
new file mode 100755
index 00000000..f1026166
--- /dev/null
+++ b/scripts/setup-hooks.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+# Setup git hooks for Pinchtab development
+
+YELLOW='\033[1;33m'
+GREEN='\033[0;32m'
+RED='\033[0;31m'
+NC='\033[0m' # No Color
+
+echo -e "${YELLOW}πŸ¦€ Pinchtab Git Hooks Setup${NC}"
+echo ""
+
+# Check if we're in the right directory
+if [ ! -d ".githooks" ]; then
+ echo -e "${RED}βœ— Error: .githooks directory not found${NC}"
+ echo " Please run this script from the Pinchtab root directory"
+ exit 1
+fi
+
+# Check current hooks path
+CURRENT_PATH=$(git config core.hooksPath)
+
+if [ "$CURRENT_PATH" = ".githooks" ]; then
+ echo -e "${GREEN}βœ“ Git hooks already configured correctly${NC}"
+ echo " Pre-commit checks will run automatically"
+else
+ echo "Setting up git hooks..."
+ git config core.hooksPath .githooks
+
+ if [ $? -eq 0 ]; then
+ echo -e "${GREEN}βœ“ Git hooks configured successfully${NC}"
+ echo ""
+ echo "Pre-commit hook will now check:"
+ echo " β€’ gofmt formatting"
+ echo " β€’ go vet"
+ echo " β€’ go test"
+ echo ""
+ echo -e "${GREEN}Ready to commit with confidence! πŸš€${NC}"
+ else
+ echo -e "${RED}βœ— Failed to configure git hooks${NC}"
+ exit 1
+ fi
+fi
\ No newline at end of file