Some checks failed
CI Pipeline / Rust Format Check (push) Successful in 6s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Failing after 10s
CI Pipeline / Build .deb & Release (push) Has been skipped
- Added HealthCheckListResponse type { checks: [...], total: number }
- Updated healthChecksApi.list() return type to HealthCheckListResponse
- Fixed HostDetailPage to use res.data?.checks instead of Array.isArray
- Added Target column to health checks table
- Added git pre-commit/pre-push hooks to prevent format CI failures
- Updated lessons.md
28 lines
967 B
Bash
Executable File
28 lines
967 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# =============================================================================
|
|
# Linux Patch Manager — Git Hooks Installer
|
|
# =============================================================================
|
|
# Installs pre-commit and pre-push hooks into .git/hooks/
|
|
# Run from repo root: ./scripts/git-hooks/install.sh
|
|
# =============================================================================
|
|
|
|
set -euo pipefail
|
|
|
|
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
|
HOOKS_DIR="${REPO_ROOT}/.git/hooks"
|
|
SOURCE_DIR="${REPO_ROOT}/scripts/git-hooks"
|
|
|
|
echo "Installing git hooks from ${SOURCE_DIR} ..."
|
|
|
|
for hook in pre-commit pre-push; do
|
|
if [[ -f "${SOURCE_DIR}/${hook}" ]]; then
|
|
cp "${SOURCE_DIR}/${hook}" "${HOOKS_DIR}/${hook}"
|
|
chmod +x "${HOOKS_DIR}/${hook}"
|
|
echo " ✓ Installed ${hook}"
|
|
else
|
|
echo " ⚠ Skipped ${hook} (not found)"
|
|
fi
|
|
done
|
|
|
|
echo "Done. Hooks will run automatically on commit and push."
|