#!/bin/sh # # Requirement traceability gate for JRay-public-server. # # A thin wrapper over the shared implementation in the `jray-project` submodule. # Everything repo-specific lives in `traceability.toml` at the repo root, so this # script only has to point the shared gate at the right tree — and a fix to the # gate benefits every component rather than one. # # scripts/traceability-gate.sh # # The submodule must be checked out. If `scripts/vendor/jray-project` is empty: # # git submodule update --init --recursive # # Environment (passed through): # MIN_COVERAGE override the threshold in traceability.toml # ALLOW_ORPHANS set to 1 to report orphan tags without failing set -eu SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) REPO_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd) VENDOR="$SCRIPT_DIR/vendor/jray-project" if [ ! -f "$VENDOR/scripts/traceability/traceability-gate.sh" ]; then echo "FAILED: the jray-project submodule is not checked out." >&2 echo " Run: git submodule update --init --recursive" >&2 exit 2 fi # REPO_ROOT is the one thing the shared gate cannot infer: its own default is # two levels above itself, which is inside the submodule once vendored. The # taxonomy, languages and thresholds all come from traceability.toml, which the # extractor discovers from this root. REPO_ROOT="$REPO_ROOT" exec sh "$VENDOR/scripts/traceability/traceability-gate.sh" "$@"