A cbor+zstd log management tool (grep, extract, merge, split, repack, redact)
cbor zstd aperture logs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041#!/usr/bin/env bash# Pre-commit hook: format check + integration tests for the czsplicer CLI.# Install (from repo root): git config core.hooksPath hooks# or: cp hooks/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commitset -euo pipefail# Resolve repo root regardless of where the hook was invoked from.REPO_ROOT="$(git rev-parse --show-toplevel)"cd "$REPO_ROOT"# Only run if Rust sources / manifests changed in this commit.if ! git diff --cached --name-only --diff-filter=ACMR | grep -qE '\.(rs|toml)$|^tests/'; then echo "[pre-commit] no Rust changes staged, skipping" exit 0fiif ! command -v cargo >/dev/null 2>&1; then echo "[pre-commit] cargo not found; skipping checks" >&2 exit 0fiecho "[pre-commit] cargo fmt --check"if ! cargo fmt --check; then echo "[pre-commit] formatting issues found — run 'cargo fmt' and re-stage" >&2 exit 1fiecho "[pre-commit] cargo clippy -- -D warnings"if ! cargo clippy --quiet -- -D warnings; then echo "[pre-commit] clippy lint warnings found" >&2 exit 1fiecho "[pre-commit] cargo test"if ! cargo test --quiet; then echo "[pre-commit] tests failed" >&2 exit 1fiecho "[pre-commit] OK"