Files
CaddyManager/scripts/dotnet-docker.sh
ebolo 7380680230
All checks were successful
Caddy Manager CI build / docker (push) Successful in 6m37s
feat: upgrade application to .NET 10
Preserve configuration defaults with the .NET 10 binder and update
dependencies, Docker builds, CI, and test tooling.
2026-07-26 15:55:11 +07:00

23 lines
716 B
Bash
Executable File

#!/usr/bin/env bash
#
# Runs any dotnet command inside the official .NET SDK container, for machines
# without a local SDK installed. The repository is mounted at /src.
#
# Usage:
# ./scripts/dotnet-docker.sh test
# ./scripts/dotnet-docker.sh build CaddyManager.sln
# ./scripts/dotnet-docker.sh test --filter FullyQualifiedName~RenameCaddyConfiguration
#
# NuGet packages are cached in a named volume so only the first run downloads them.
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
exec docker run --rm \
--volume "$repo_root":/src \
--workdir /src \
--volume caddymanager-nuget:/root/.nuget/packages \
mcr.microsoft.com/dotnet/sdk:10.0 \
dotnet "$@"