#!/bin/sh

set -eu

REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
cd "$REPO_ROOT"

echo "pre-push: version/tag consistency"
"$REPO_ROOT/scripts/check-version-match.sh"

echo "pre-push: cargo clippy --all-targets --all-features -- -D warnings"
cargo clippy --all-targets --all-features -- -D warnings

echo "pre-push: cargo test"
cargo test
