#!/usr/bin/env bash # Offline regression for tools/ci/ci-paths.sh (review M8 P2) in a disposable Git # repository: multi-commit pushes ending in documentation, missing and unknown bases, # pull requests, manual dispatch, and changes to only a check script. Uncertainty # must run validation. Run by the deploy suite before it decides anything. set -euo pipefail script="$(cd "$(dirname "$0")" && pwd)/ci-paths.sh" repo="$(mktemp -d /tmp/evo-ci-paths.XXXXXXXX)" trap 'rm -rf -- "$repo"' EXIT cd "$repo" git init -q git config user.email ci@example.invalid git config user.name ci mkdir -p src docs tools/ci echo base > src/a.cpp; echo base > docs/a.md; echo base > tools/ci/dr-check.sh git add .; git commit -qm base base="$(git rev-parse HEAD)" echo change >> src/a.cpp; git commit -qam implementation echo change >> docs/a.md; git commit -qam documentation docs_only_base="$(git rev-parse HEAD~1)" failures=0 expect() { # expect