diff --git a/.githooks/install.sh b/.github/hooks/install.sh similarity index 82% rename from .githooks/install.sh rename to .github/hooks/install.sh index 80bc224..00140d9 100755 --- a/.githooks/install.sh +++ b/.github/hooks/install.sh @@ -2,21 +2,21 @@ # SPDX-License-Identifier: MPL-2.0 # # Install Git hooks for Candy Crash -# Usage: ./.githooks/install.sh +# Usage: ./.github/hooks/install.sh set -e echo "🔧 Installing Git hooks..." # Method 1: Use git config to set hooks path (Git 2.9+) -if git config core.hooksPath .githooks; then +if git config core.hooksPath .github/hooks; then echo "✓ Git hooks path set to .githooks" echo "✓ Hooks will run automatically on commit and push" else # Method 2: Fallback to copying hooks (older Git versions) echo "⚠️ Could not set hooks path, copying hooks manually..." - cp .githooks/pre-commit .git/hooks/pre-commit - cp .githooks/pre-push .git/hooks/pre-push + cp .github/hooks/pre-commit .git/hooks/pre-commit + cp .github/hooks/pre-push .git/hooks/pre-push chmod +x .git/hooks/pre-commit .git/hooks/pre-push echo "✓ Hooks copied to .git/hooks/" fi diff --git a/.githooks/pre-commit b/.github/hooks/pre-commit similarity index 94% rename from .githooks/pre-commit rename to .github/hooks/pre-commit index 880cda5..9575372 100755 --- a/.githooks/pre-commit +++ b/.github/hooks/pre-commit @@ -5,7 +5,7 @@ # Thin wrapper that delegates to Just recipes # # Installation: -# ./.githooks/install.sh +# ./.github/hooks/install.sh set -e diff --git a/.githooks/pre-push b/.github/hooks/pre-push similarity index 97% rename from .githooks/pre-push rename to .github/hooks/pre-push index a2f9e42..fb95db2 100755 --- a/.githooks/pre-push +++ b/.github/hooks/pre-push @@ -5,7 +5,7 @@ # Thin wrapper that delegates to Just recipes # # Installation: -# ./.githooks/install.sh +# ./.github/hooks/install.sh set -e diff --git a/bootstrap.sh b/bootstrap.sh index 3b80f2d..a8d3510 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -166,7 +166,7 @@ fi # Install Git hooks if Just is available if command -v just &> /dev/null; then echo "🔧 Setting up Git hooks..." - if ./.githooks/install.sh; then + if ./.github/hooks/install.sh; then echo -e "${GREEN}✓${NC} Git hooks installed" else echo -e "${YELLOW}⚠${NC} Could not install Git hooks"