Files
claude-code/.github/hooks/pre-push
Yeachan-Heo c613e8e676 feat: sweep
2026-05-25 04:36:30 +00:00

21 lines
610 B
Bash
Executable File

#!/usr/bin/env bash
# Claw Code local pre-push safety gate.
#
# Install with:
# git config core.hooksPath .github/hooks
#
# This intentionally mirrors the CI build gate so stale field/enum references are
# caught before pushing to main or PR branches.
set -euo pipefail
repo_root="$(git rev-parse --show-toplevel 2>/dev/null)"
cd "$repo_root"
if [[ ! -f rust/Cargo.toml ]]; then
echo "pre-push: rust/Cargo.toml not found; skipping cargo workspace build" >&2
exit 0
fi
echo "pre-push: cargo build --manifest-path rust/Cargo.toml --workspace" >&2
cargo build --manifest-path rust/Cargo.toml --workspace