Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .githooks/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
git config core.hooksPath .githooks
chmod +x .githooks/pre-push 2>/dev/null || true
echo "Git hooks installed (core.hooksPath=.githooks)."
echo "pre-push: shellcheck scripts/*.sh + bats tests/ (skipped if tools missing)"
16 changes: 16 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail

if command -v shellcheck >/dev/null 2>&1; then
echo "==> shellcheck scripts/*.sh"
shellcheck scripts/*.sh
else
echo "(shellcheck not installed — skipping; CI will run it)"
fi

if command -v bats >/dev/null 2>&1; then
echo "==> bats tests/"
bats tests/
else
echo "(bats not installed — skipping; CI will run it)"
fi
Loading