#!/usr/bin/env bash set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" cd "$SCRIPT_DIR" tmpdir="$(mktemp -d)" cleanup() { rm -rf "$tmpdir" } trap cleanup EXIT resolve_python_bin() { local candidate for candidate in python3 python; do if command -v "$candidate" >/dev/null 2>&1 && "$candidate" -V >/dev/null 2>&1; then printf '%s\n' "$candidate" return 0 fi done return 1 } PYTHON_BIN="$(resolve_python_bin || true)" if [[ -z "$PYTHON_BIN" ]]; then echo "skip: validate-driver-release-manifest.test.sh requires python3 or python" >&2 exit 0 fi source_commit="$(git rev-parse HEAD)" manifest_path="$tmpdir/manifest.json" cat >"$manifest_path" <&2 exit 1 fi echo "validate-driver-release-manifest test passed"