This commit is contained in:
2026-09-17 18:54:53 +01:00
commit eac5fbdbf5
38 changed files with 3974 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Run any dotnet command for this repo.
#
# Why a wrapper:
# - dotnet is installed via mise (see mise.toml, dotnet = "10"); it is NOT on
# PATH in agent/sandbox shells, so plain `dotnet` fails with 127.
# - dotnet SDK 10 fails with "The user's home directory could not be
# determined" unless DOTNET_CLI_HOME is set.
# - The test runner must be invoked from the repo root (the parent directory
# of the test project), so we always cd here first.
#
# Usage: scripts/dotnet.sh <dotnet command and args>
# scripts/dotnet.sh test db-subclass-to-dto.sln
# scripts/dotnet.sh build
set -euo pipefail
cd "$(dirname "$0")/.."
export DOTNET_CLI_HOME="${DOTNET_CLI_HOME:-$HOME/.dotnet-cli}"
export DOTNET_NOLOGO=1
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
if ! command -v mise >/dev/null 2>&1; then
echo "error: mise not found on PATH; install mise or put dotnet on PATH" >&2
exit 1
fi
if [ "$#" -eq 0 ]; then
exec mise exec -- dotnet --version
fi
exec mise exec -- dotnet "$@"
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Render a mermaid diagram to SVG using mmdc with sandbox/GPU workarounds
# for Ubuntu 24.04+ (AppArmor restrictions).
#
# Usage: scripts/mermaid.sh input.mmd [output.svg]
# scripts/mermaid.sh input.mmd - # output to stdout
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
CONFIG="$REPO_ROOT/puppeteer.config.json"
if [[ $# -lt 1 ]]; then
echo "Usage: $0 <input.mmd> [output.svg|-]" >&2
exit 1
fi
INPUT="$1"
shift
ARGS=("-i" "$INPUT" "-p" "$CONFIG")
if [[ $# -gt 0 ]]; then
OUTPUT="$1"
shift
ARGS+=("-o" "$OUTPUT")
fi
ARGS+=("$@")
exec mmdc "${ARGS[@]}"
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Run the full test suite from the repo root (see scripts/dotnet.sh for why).
# Usage: scripts/run-tests.sh [extra dotnet test args]
set -euo pipefail
exec "$(cd "$(dirname "$0")" && pwd)/dotnet.sh" test db-subclass-to-dto.sln "$@"