#!/usr/bin/env bash
# Copyright 2026 Petri Koistinen. Licensed under the Apache License, Version 2.0.

# Refuses any push with unformatted code, compilation failures, or failing unit tests.
# The gate is Scripts/test.sh pr. `git commit --no-verify` does not skip this.
#
# Activate once per clone:
#   git config core.hooksPath Scripts/githooks

set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
Scripts/QualityReceipt.py verify-push
Scripts/test.sh pr
