F0: fondamenta della soluzione, script, documenti e harness di test
- 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
This commit is contained in:
36 files changed
+1647
-2
No files matched your search
@@ -0,0 +1,34 @@
|
||||
# Compila la soluzione su Windows (equivalente di scripts/build.sh).
|
||||
# Uso: ./scripts/build.ps1 [-Configuration Release] [-Client]
|
||||
param(
|
||||
[string]$Configuration = "Release",
|
||||
[switch]$Client,
|
||||
[switch]$Test
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-Location (Join-Path $PSScriptRoot "..")
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = "1"
|
||||
$env:DOTNET_NOLOGO = "1"
|
||||
|
||||
# Regola: zero pacchetti NuGet fuori dal client Godot.
|
||||
$bad = Get-ChildItem -Recurse -Include *.csproj,*.props,*.targets |
|
||||
Where-Object { $_.FullName -notmatch '[\\/](client|bin|obj|\.git)[\\/]' } |
|
||||
Where-Object { Select-String -Path $_.FullName -Pattern '<PackageReference|<PackageVersion|<GlobalPackageReference' -Quiet }
|
||||
if ($bad) { $bad | ForEach-Object { Write-Error "Pacchetto NuGet in $($_.FullName)" }; exit 1 }
|
||||
|
||||
dotnet build ViaFerrea.sln -c $Configuration -nologo -v minimal
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
|
||||
if ($Test) {
|
||||
dotnet run --project tests/ViaFerrea.Tests -c $Configuration --no-build
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
}
|
||||
|
||||
if ($Client) {
|
||||
# Il server locale viene pubblicato dentro la cartella del client esportato.
|
||||
dotnet publish src/ViaFerrea.Server -c $Configuration -r win-x64 --self-contained true -o client/ViaFerrea.Client/export/windows/server
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
dotnet build client/ViaFerrea.Client/ViaFerrea.Client.csproj -c $Configuration
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
}
|
||||
Write-Host "build: ok ($Configuration)"
|
||||
Reference in new issue
Block a user