mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-22 12:37:24 +01:00
Reorganize projects so that building ReleaseNotes is quicker
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<!-- Usage: Primary JSON library -->
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,5 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../build/NugetCommon.props" />
|
||||
<Import Project="../../build/NewtonsoftJson.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TgsNugetNetFramework)</TargetFramework>
|
||||
@@ -28,8 +29,6 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" />
|
||||
<!-- Usage: Decoding the 'nbf' property of JWTs -->
|
||||
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.6.2" />
|
||||
<!-- Usage: Primary JSON library -->
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<!-- Usage: Data model annotating -->
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Tgstation.Server.Api\Tgstation.Server.Api.csproj" />
|
||||
<ProjectReference Include="..\Tgstation.Server.Common\Tgstation.Server.Common.csproj" /> <!-- Needed for explicit nuget versioning -->
|
||||
<!-- Already exists via TGS.Server.Api, but needed for explicit nuget versioning -->
|
||||
<ProjectReference Include="..\Tgstation.Server.Common\Tgstation.Server.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -5,6 +5,7 @@ using Newtonsoft.Json.Serialization;
|
||||
|
||||
using Tgstation.Server.Host.Extensions.Converters;
|
||||
using Tgstation.Server.Host.Properties;
|
||||
using Tgstation.Server.Shared;
|
||||
|
||||
namespace Tgstation.Server.Host.Components.Interop
|
||||
{
|
||||
|
||||
@@ -50,7 +50,6 @@ using Tgstation.Server.Host.Controllers;
|
||||
using Tgstation.Server.Host.Controllers.Results;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.Extensions;
|
||||
using Tgstation.Server.Host.Extensions.Converters;
|
||||
using Tgstation.Server.Host.IO;
|
||||
using Tgstation.Server.Host.Jobs;
|
||||
using Tgstation.Server.Host.Properties;
|
||||
@@ -61,6 +60,7 @@ using Tgstation.Server.Host.Swarm;
|
||||
using Tgstation.Server.Host.System;
|
||||
using Tgstation.Server.Host.Transfer;
|
||||
using Tgstation.Server.Host.Utils;
|
||||
using Tgstation.Server.Shared;
|
||||
|
||||
namespace Tgstation.Server.Host.Core
|
||||
{
|
||||
|
||||
@@ -23,11 +23,11 @@ using Npgsql;
|
||||
using Tgstation.Server.Common;
|
||||
using Tgstation.Server.Host.Configuration;
|
||||
using Tgstation.Server.Host.Database;
|
||||
using Tgstation.Server.Host.Extensions.Converters;
|
||||
using Tgstation.Server.Host.IO;
|
||||
using Tgstation.Server.Host.Properties;
|
||||
using Tgstation.Server.Host.System;
|
||||
using Tgstation.Server.Host.Utils;
|
||||
using Tgstation.Server.Shared;
|
||||
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
@@ -986,14 +986,15 @@ namespace Tgstation.Server.Host.Setup
|
||||
{ SwarmConfiguration.Section, swarmConfiguration },
|
||||
};
|
||||
|
||||
var versionConverter = new VersionConverter();
|
||||
var builder = new SerializerBuilder()
|
||||
.WithTypeConverter(new VersionConverter());
|
||||
.WithTypeConverter(versionConverter);
|
||||
|
||||
if (userConfigFileName.EndsWith(".json", StringComparison.OrdinalIgnoreCase))
|
||||
builder.JsonCompatible();
|
||||
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithTypeConverter(new VersionConverter())
|
||||
.WithTypeConverter(versionConverter)
|
||||
.Build();
|
||||
|
||||
var serializedYaml = serializer.Serialize(map);
|
||||
|
||||
@@ -3,6 +3,7 @@ using Newtonsoft.Json.Serialization;
|
||||
|
||||
using Tgstation.Server.Api;
|
||||
using Tgstation.Server.Host.Extensions.Converters;
|
||||
using Tgstation.Server.Shared;
|
||||
|
||||
namespace Tgstation.Server.Host.Swarm
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Import Project="../../build/SrcCommon.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -77,8 +77,6 @@
|
||||
<PackageReference Include="GitLabApiClient" Version="1.8.0" />
|
||||
<!-- Usage: git interop -->
|
||||
<PackageReference Include="LibGit2Sharp" Version="0.30.0" />
|
||||
<!-- Usage: JWT injection into HTTP pipeline -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
|
||||
<!-- Usage: Support ""legacy"" Newotonsoft.Json in HTTP pipeline. The rest of our codebase uses Newtonsoft. -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6" />
|
||||
<!-- Usage: Using target JSON serializer for API -->
|
||||
@@ -102,8 +100,6 @@
|
||||
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
|
||||
<!-- Usage: PostgresSQL ORM plugin -->
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
|
||||
<!-- Usage: GitHub.com interop -->
|
||||
<PackageReference Include="Octokit" Version="13.0.0" />
|
||||
<!-- Usage: MYSQL/MariaDB ORM plugin -->
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
||||
<!-- Usage: Discord interop -->
|
||||
@@ -135,6 +131,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Tgstation.Server.Api\Tgstation.Server.Api.csproj" />
|
||||
<ProjectReference Include="..\Tgstation.Server.Host.Common\Tgstation.Server.Host.Common.csproj" />
|
||||
<ProjectReference Include="..\Tgstation.Server.Shared\Tgstation.Server.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../build/NewtonsoftJson.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Usage: JWT injection into HTTP pipeline -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
|
||||
<!-- Usage: GitHub.com interop -->
|
||||
<PackageReference Include="Octokit" Version="13.0.0" />
|
||||
<!-- Usage: YAML conversion of Version objects -->
|
||||
<PackageReference Include="YamlDotNet" Version="16.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Tgstation.Server.Common\Tgstation.Server.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+4
-6
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using Tgstation.Server.Common.Extensions;
|
||||
|
||||
@@ -8,7 +6,7 @@ using YamlDotNet.Core;
|
||||
using YamlDotNet.Core.Events;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Tgstation.Server.Host.Extensions.Converters
|
||||
namespace Tgstation.Server.Shared
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="JsonConverter"/> and <see cref="IYamlTypeConverter"/> for serializing <see cref="global::System.Version"/>s in semver format.
|
||||
@@ -85,10 +83,10 @@ namespace Tgstation.Server.Host.Extensions.Converters
|
||||
public bool Accepts(Type type) => CheckSupportsType(type, false);
|
||||
|
||||
/// <inheritdoc />
|
||||
public object ReadYaml(IParser parser, Type type) => throw new NotSupportedException("Deserialization not supported!"); // The default implementation is fine at handling this
|
||||
public object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotSupportedException("Deserialization not supported!"); // The default implementation is fine at handling this
|
||||
|
||||
/// <inheritdoc />
|
||||
public void WriteYaml(IEmitter? emitter, object? value, Type type)
|
||||
public void WriteYaml(IEmitter? emitter, object? value, Type type, ObjectSerializer serializer)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(emitter);
|
||||
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System;
|
||||
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
using Tgstation.Server.Common.Extensions;
|
||||
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Tgstation.Server.Host.Extensions.Converters.Tests
|
||||
namespace Tgstation.Server.Shared.Tests
|
||||
{
|
||||
[TestClass]
|
||||
public sealed class TestVersionConverter
|
||||
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../build/TestCommon.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>$(TgsFrameworkVersion)</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Tgstation.Server.Shared\Tgstation.Server.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+31
-1
@@ -29,6 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6
|
||||
build\Dockerfile = build\Dockerfile
|
||||
build\GenerateMigrations.sh = build\GenerateMigrations.sh
|
||||
build\logo.svg = build\logo.svg
|
||||
build\NewtonsoftJson.props = build\NewtonsoftJson.props
|
||||
build\NugetCommon.props = build\NugetCommon.props
|
||||
build\OpenApiValidationSettings.json = build\OpenApiValidationSettings.json
|
||||
build\SrcCommon.props = build\SrcCommon.props
|
||||
@@ -261,7 +262,11 @@ Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Tgstation.Server.Host.Servi
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.ReleaseNotes", "tools\Tgstation.Server.ReleaseNotes\Tgstation.Server.ReleaseNotes.csproj", "{69944039-65C2-40E1-9D86-0608FA0C2D70}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tgstation.Server.LogoGenerator", "tools\Tgstation.Server.LogoGenerator\Tgstation.Server.LogoGenerator.csproj", "{7F7FCFDF-271D-45C2-830C-BCCB19C57077}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.LogoGenerator", "tools\Tgstation.Server.LogoGenerator\Tgstation.Server.LogoGenerator.csproj", "{7F7FCFDF-271D-45C2-830C-BCCB19C57077}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Shared", "src\Tgstation.Server.Shared\Tgstation.Server.Shared.csproj", "{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Shared.Tests", "tests\Tgstation.Server.Shared.Tests\Tgstation.Server.Shared.Tests.csproj", "{EAB84FD0-5514-4254-B188-7D90ACB7284D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -533,6 +538,30 @@ Global
|
||||
{7F7FCFDF-271D-45C2-830C-BCCB19C57077}.ReleaseNoWindows|Any CPU.Build.0 = Release|Any CPU
|
||||
{7F7FCFDF-271D-45C2-830C-BCCB19C57077}.ReleaseNoWix|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7F7FCFDF-271D-45C2-830C-BCCB19C57077}.ReleaseNoWix|Any CPU.Build.0 = Release|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWindows|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWindows|Any CPU.Build.0 = Debug|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWix|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.DebugNoWix|Any CPU.Build.0 = Debug|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWindows|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWindows|Any CPU.Build.0 = Release|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWix|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{74B9AC97-DEEC-49F4-B3B3-E07126A52B47}.ReleaseNoWix|Any CPU.Build.0 = Release|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWindows|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWindows|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWix|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.DebugNoWix|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWindows|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWindows|Any CPU.Build.0 = Release|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWix|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D}.ReleaseNoWix|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -571,6 +600,7 @@ Global
|
||||
{9E66C6F1-E235-4979-83B5-C2B3FDAD6E01} = {506B9092-AF88-4DA2-84FD-C11646B695B0}
|
||||
{69944039-65C2-40E1-9D86-0608FA0C2D70} = {A55C1117-5808-4AB2-BEA6-4D4A3E66A2F2}
|
||||
{7F7FCFDF-271D-45C2-830C-BCCB19C57077} = {A55C1117-5808-4AB2-BEA6-4D4A3E66A2F2}
|
||||
{EAB84FD0-5514-4254-B188-7D90ACB7284D} = {316141B0-CD21-4769-A013-D53DA9B9EC09}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {DFD36C95-3E49-41C7-ACDB-86BAF5B18A79}
|
||||
|
||||
@@ -25,7 +25,7 @@ using Newtonsoft.Json;
|
||||
using Octokit;
|
||||
using Octokit.GraphQL;
|
||||
|
||||
using Tgstation.Server.Host.Extensions.Converters;
|
||||
using Tgstation.Server.Shared;
|
||||
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Tgstation.Server.Host\Tgstation.Server.Host.csproj" />
|
||||
<ProjectReference Include="..\..\src\Tgstation.Server.Shared\Tgstation.Server.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user