fix: Moves codegen to its own repo (#918)

- [X] Replace serialization generator with nuget
- [X] Replace schema migration with dotnet bool
- [X] Add ability to run migrations in VS/Rider using a project build
This commit is contained in:
Kamron Batman 2022-02-12 17:58:42 -08:00 committed by GitHub
parent 01a41732f1
commit 48f1fe3384
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 48 additions and 4727 deletions

View file

@ -27,21 +27,19 @@ if [[ $os == *'centos'* || $os == *'rhel'* ]]; then
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
fi
echo dotnet tool restore
dotnet tool restore
echo dotnet clean --verbosity quiet
dotnet clean --verbosity quiet
echo dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
echo dotnet build -c Release Projects/SerializationGenerator/SerializationGenerator.csproj
dotnet build -c Release Projects/SerializationGenerator/SerializationGenerator.csproj
echo dotnet publish ${config} ${os} --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
dotnet publish ${config} ${os} --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
echo dotnet build -c Release Projects/SerializationSchemaGenerator/SerializationSchemaGenerator.csproj
dotnet build -c Release Projects/SerializationSchemaGenerator/SerializationSchemaGenerator.csproj
echo Generating serialization schemas
dotnet Projects/SerializationSchemaGenerator/Output/SerializationSchemaGenerator.dll ModernUO.sln
echo Generating serialization migration schema...
dotnet tool run ModernUOSchemaGenerator ModernUO.sln
exit $?
@ -63,18 +61,16 @@ IF "%~2" == "" (
SET os=-r %~2-x64
)
echo dotnet tool restore
dotnet tool restore
echo dotnet clean --verbosity quiet
dotnet clean --verbosity quiet
echo dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
echo dotnet build -c Release Projects/SerializationGenerator/SerializationGenerator.csproj
dotnet build -c Release Projects/SerializationGenerator/SerializationGenerator.csproj
echo dotnet publish %config% %os% --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj
dotnet publish %config% %os% --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj
echo dotnet build -c Release Projects/SerializationSchemaGenerator/SerializationSchemaGenerator.csproj
dotnet build -c Release Projects/SerializationSchemaGenerator/SerializationSchemaGenerator.csproj
echo Generating serialization schemas
dotnet Projects/SerializationSchemaGenerator/Output/SerializationSchemaGenerator.dll ModernUO.sln
echo Generating serialization migration schema...
dotnet tool run ModernUOSchemaGenerator ModernUO.sln