From 1eee2ce9d8fcc9c68a54cea3847422d30a9d6ca4 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Thu, 27 Jul 2023 01:40:42 -0400 Subject: [PATCH] Fix release build issues --- build/Version.props | 2 +- src/Tgstation.Server.Client/Components/ConfigurationClient.cs | 2 +- src/Tgstation.Server.Client/ServerClientFactory.cs | 2 +- src/Tgstation.Server.Host/Components/Byond/ByondManager.cs | 2 +- src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs | 2 +- src/Tgstation.Server.Host/Database/SqlServerDatabaseContext.cs | 1 - src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/build/Version.props b/build/Version.props index 44127192af..a65853b980 100644 --- a/build/Version.props +++ b/build/Version.props @@ -8,7 +8,7 @@ 9.11.0 6.0.0 11.0.0 - 12.0.0 + 13.0.0 6.5.2 5.6.1 1.4.0 diff --git a/src/Tgstation.Server.Client/Components/ConfigurationClient.cs b/src/Tgstation.Server.Client/Components/ConfigurationClient.cs index 581c1ad791..378811083d 100644 --- a/src/Tgstation.Server.Client/Components/ConfigurationClient.cs +++ b/src/Tgstation.Server.Client/Components/ConfigurationClient.cs @@ -53,7 +53,7 @@ namespace Tgstation.Server.Client.Components if (file == null) throw new ArgumentNullException(nameof(file)); var configFile = await ApiClient.Read( - Routes.ConfigurationFile + Routes.SanitizeGetPath(file.Path ?? throw new ArgumentException("file.Path should not be null!", nameof(file))), + Routes.ConfigurationFile + Routes.SanitizeGetPath(file.Path ?? throw new InvalidOperationException("file.Path should not be null!")), instance.Id!.Value, cancellationToken) .ConfigureAwait(false); diff --git a/src/Tgstation.Server.Client/ServerClientFactory.cs b/src/Tgstation.Server.Client/ServerClientFactory.cs index b27e4dd9c5..b611bd36da 100644 --- a/src/Tgstation.Server.Client/ServerClientFactory.cs +++ b/src/Tgstation.Server.Client/ServerClientFactory.cs @@ -100,7 +100,7 @@ namespace Tgstation.Server.Client if (token == null) throw new ArgumentNullException(nameof(token)); if (token.Bearer == null) - throw new ArgumentException("token.Bearer should not be null!", nameof(token)); + throw new InvalidOperationException("token.Bearer should not be null!"); return new ServerClient(ApiClientFactory.CreateApiClient(host, new ApiHeaders(productHeaderValue, token.Bearer), null, false), token); } diff --git a/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs b/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs index 16fa34998d..a10fdb8425 100644 --- a/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs +++ b/src/Tgstation.Server.Host/Components/Byond/ByondManager.cs @@ -107,7 +107,7 @@ namespace Tgstation.Server.Host.Components.Byond ArgumentNullException.ThrowIfNull(version); if (version.Build == 0) - throw new ArgumentException("version.Build cannot be 0!", nameof(version)); + throw new InvalidOperationException("version.Build cannot be 0!"); } /// diff --git a/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs b/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs index 22233ce36b..aa34c3cc7b 100644 --- a/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs +++ b/src/Tgstation.Server.Host/Configuration/GeneralConfiguration.cs @@ -148,7 +148,7 @@ namespace Tgstation.Server.Host.Configuration else if (ConfigVersion != CurrentConfigVersion) if (ConfigVersion.Major != CurrentConfigVersion.Major) logger.LogCritical( - "Your `ConfigVersion` is majorly out-of-date and may potentially cause issues running the server. Please follow migration instructions from the TGS release notes.", + "Your `ConfigVersion` is majorly out-of-date and may potentially cause issues running the server. Please follow migration instructions from the TGS release notes. The current version is \"{currentVersion}\"", CurrentConfigVersion); else logger.LogWarning("Your `ConfigVersion` is out-of-date. Please follow migration instructions from the TGS release notes."); diff --git a/src/Tgstation.Server.Host/Database/SqlServerDatabaseContext.cs b/src/Tgstation.Server.Host/Database/SqlServerDatabaseContext.cs index 4402b956b9..3997e0a46b 100644 --- a/src/Tgstation.Server.Host/Database/SqlServerDatabaseContext.cs +++ b/src/Tgstation.Server.Host/Database/SqlServerDatabaseContext.cs @@ -1,5 +1,4 @@ using System; -using System.Data.SqlClient; using Microsoft.EntityFrameworkCore; diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index e413cc6fe8..a2e5dc9368 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -6,7 +6,7 @@ $(TgsCoreVersion) true false - API1000 + API1000;ASP0019 ClientApp/node_modules ClientApp/node_modules/.install-stamp Linux