#!/usr/bin/env bash
# Run Smithplates linters and/or tests using Nix (preferred) or Docker.
#
#   ./validate                              # lint + test (default)
#   ./validate build                        # lint and compile only
#   ./validate test                         # tests only
#   ./validate lint,test                    # explicit default
#   ./validate lint --target python/db/sqlite
#   ./validate --target examples/python test
#   ./validate --target examples lint,test
#   ./validate --target plugin test
set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT"

# shellcheck source=scripts/lib/validate-backend.sh
source "${ROOT}/scripts/lib/validate-backend.sh"

smithystache_validate_main "$@"
