- ViaFerrea.sln con Core e Protocol (net10.0 + net8.0), Server, Tools, Tests - Directory.Build.props con versione unica e warning come errori - Script build/test/check-nuget/publish-image (+ build.ps1) - Documenti: GUIDA, GDD, ARCHITECTURE, PROTOCOL (bozza), STATE, ADR 0001 - Harness di test interno con i primi test su Rng (xoshiro256**) - Immagini di riferimento 01-05 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191R7vXgtbAvSV4V8tj8uzL
29 lines
937 B
Bash
Executable File
29 lines
937 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Costruisce l'immagine Docker del server con il tag della versione (da Directory.Build.props)
|
|
# e "latest", poi la pubblica sul registry Gitea.
|
|
# Uso: VF_REGISTRY=gitea.lan:3000/utente scripts/publish-image.sh [--no-push]
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
version="$(sed -n 's:.*<Version>\(.*\)</Version>.*:\1:p' Directory.Build.props | head -n1)"
|
|
if [ -z "$version" ]; then
|
|
echo "ERRORE: versione non trovata in Directory.Build.props" >&2
|
|
exit 1
|
|
fi
|
|
registry="${VF_REGISTRY:-}"
|
|
name="via-ferrea-server"
|
|
image="${registry:+$registry/}$name"
|
|
|
|
docker build -f docker/Dockerfile -t "$image:$version" -t "$image:latest" .
|
|
echo "immagine: $image:$version"
|
|
|
|
if [ "${1:-}" = "--no-push" ]; then
|
|
exit 0
|
|
fi
|
|
if [ -z "$registry" ]; then
|
|
echo "VF_REGISTRY non impostato: immagine solo locale (usa --no-push per non vedere questo avviso)" >&2
|
|
exit 0
|
|
fi
|
|
docker push "$image:$version"
|
|
docker push "$image:latest"
|