A playable console Minesweeper (arrow keys, chording, flags, question marks, pause, difficulty presets) plus a deduction-and-guess solver that can play the game headlessly. Game logic lives in src/Minesweeper/Game and has no console dependencies, so it is covered by 65 unit tests. Includes publishing helpers for self-contained, trimmed single-file binaries (publish.sh) and an .editorconfig that the sources conform to: UTF-8 BOM and 4-space indents for C#, 2-space indents for project files, LF endings and 2-space indents for shell scripts, System-first usings, no redundant `this.`, and s_/ _ prefixed private static and instance fields.
34 lines
874 B
Bash
Executable File
34 lines
874 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds self-contained, trimmed, single-file binaries for Linux and Windows.
|
|
# Usage: ./publish.sh [linux-x64|win-x64|linux-arm64|win-arm64 ...] (default: linux-x64 win-x64)
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
rids=("$@")
|
|
if [ ${#rids[@]} -eq 0 ]; then
|
|
rids=(linux-x64 win-x64)
|
|
fi
|
|
|
|
for rid in "${rids[@]}"; do
|
|
out="artifacts/$rid"
|
|
echo "==> publishing $rid"
|
|
dotnet publish src/Minesweeper \
|
|
--configuration Release \
|
|
--runtime "$rid" \
|
|
--self-contained true \
|
|
-p:PublishTrimmed=true \
|
|
-p:PublishSingleFile=true \
|
|
-p:IncludeNativeLibrariesForSelfExtract=true \
|
|
-p:DebugType=none \
|
|
-p:DebugSymbols=false \
|
|
--output "$out"
|
|
binary="$out/minesweeper"
|
|
case "$rid" in
|
|
win-*) binary="$binary.exe" ;;
|
|
esac
|
|
du -h "$binary" | sed 's/^/ /'
|
|
done
|
|
|
|
echo "done - binaries are under artifacts/<runtime>/"
|