cloudflare/cloudflared
Publicmirrored fromhttps://github.com/cloudflare/cloudflaredAvailable
.githooks/pre-push
29lines · modecode
| 1 | #!/bin/sh |
| 2 | # Pre-push hook for cloudflared |
| 3 | # Runs linting and tests before allowing pushes |
| 4 | |
| 5 | set -e |
| 6 | |
| 7 | echo "========================================" |
| 8 | echo "Running pre-push checks..." |
| 9 | echo "========================================" |
| 10 | |
| 11 | # Run formatting check |
| 12 | echo "" |
| 13 | echo "==> Checking formatting..." |
| 14 | make fmt-check |
| 15 | |
| 16 | # Run linter |
| 17 | echo "" |
| 18 | echo "==> Running linter..." |
| 19 | make lint |
| 20 | |
| 21 | # Run tests |
| 22 | echo "" |
| 23 | echo "==> Running tests..." |
| 24 | make test |
| 25 | |
| 26 | echo "" |
| 27 | echo "========================================" |
| 28 | echo "All pre-push checks passed!" |
| 29 | echo "========================================" |
| 30 | |