#!/usr/bin/env bash # Fallisce se un progetto .NET della soluzione contiene un PackageReference (regola: zero NuGet). # Il client Godot è escluso: il suo SDK è l'unica dipendenza esterna ammessa. set -euo pipefail cd "$(dirname "$0")/.." found=0 while IFS= read -r -d '' f; do if grep -qiE '&2 grep -niE '&2 found=1 fi done < <(find . \( -path ./client -o -path ./.git -o -name bin -o -name obj \) -prune -o \ \( -name '*.csproj' -o -name '*.props' -o -name '*.targets' \) -print0) if [ -f packages.config ] || [ -f Directory.Packages.props ]; then echo "ERRORE: gestione centralizzata dei pacchetti non ammessa" >&2 found=1 fi if [ "$found" -ne 0 ]; then exit 1 fi echo "check-nuget: nessun pacchetto NuGet"