Il progetto adotta il nome «Rail Enterprise» ovunque (codice RailEnterprise.*, variabili RE_*, intestazioni RESV/RECL, immagine rail-enterprise-server) per allinearsi al repository Gitea. Aggiunge Gitea Actions sul modello di Chronos: CI su PR e main, rilascio da tag con gioco Windows (client Godot + server in server/), server Windows/Linux e immagine Docker nel registro Gitea, nightly. Aggiunge i riferimenti visivi 06–09, i modelli di PR e issue, l'ADR 0014 e aggiorna README (comandi locali), STATE e CLAUDE.md. 120 test verdi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.5 KiB
PowerShell
35 lines
1.5 KiB
PowerShell
# 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 RailEnterprise.sln -c $Configuration -nologo -v minimal
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
|
|
if ($Test) {
|
|
dotnet run --project tests/RailEnterprise.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/RailEnterprise.Server -c $Configuration -r win-x64 --self-contained true -o client/RailEnterprise.Client/export/windows/server
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
dotnet build client/RailEnterprise.Client/RailEnterprise.Client.csproj -c $Configuration
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
}
|
|
Write-Host "build: ok ($Configuration)"
|