-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsetup-hooks.sh
More file actions
executable file
·44 lines (35 loc) · 1.04 KB
/
Copy pathsetup-hooks.sh
File metadata and controls
executable file
·44 lines (35 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Setup script for tesseract-rs development environment
echo "Setting up tesseract-rs development environment..."
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js to use commit hooks."
echo " Visit: https://nodejs.org/"
exit 1
fi
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed. Please install npm."
exit 1
fi
echo "✅ Node.js and npm are installed"
# Install dependencies
echo "Installing Node.js dependencies..."
npm install
# Setup husky
echo "Setting up Git hooks..."
npx husky install
# Make hooks executable
chmod +x .husky/commit-msg
chmod +x .husky/pre-commit
echo "✅ Git hooks installed successfully!"
echo ""
echo "Commit message format:"
echo " <type>[optional scope]: <description>"
echo ""
echo "Examples:"
echo " feat: add new OCR feature"
echo " fix: resolve memory leak issue"
echo " docs: update installation guide"
echo ""
echo "For more details, see CONTRIBUTING.md"