Skip to content

Commit

Permalink
Dependency updates
Browse files Browse the repository at this point in the history
Migration for 64-bit GitHub Deployment IDs
  • Loading branch information
Cyberboss committed Jul 1, 2024
1 parent 0d96155 commit 40d667f
Show file tree
Hide file tree
Showing 22 changed files with 3,502 additions and 56 deletions.
8 changes: 4 additions & 4 deletions build/TestCommon.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Usage: Logging specific for GitHub actions -->
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3">
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Usage: Hard to say what exactly this is for, but not including it removes the test icon and breaks vstest.console.exe for some reason -->
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" Condition="'$(TgsTestNoSdk)' != 'true'" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" Condition="'$(TgsTestNoSdk)' != 'true'" />
<!-- Usage: Dependency mocking for tests -->
<!-- Pinned: Be VERY careful about updating https://github.com/moq/moq/issues/1372 -->
<PackageReference Include="Moq" Version="4.20.70" />
<!-- Usage: MSTest execution -->
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
<!-- Usage: MSTest asserts etc... -->
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion build/Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<TgsNugetNetFramework>netstandard2.0</TgsNugetNetFramework>
<TgsNetMajorVersion>8</TgsNetMajorVersion>
<!-- Update this frequently with dotnet runtime patches. MAJOR MUST MATCH ABOVE! -->
<TgsDotnetRedistUrl>https://download.visualstudio.microsoft.com/download/pr/00397fee-1bd9-44ef-899b-4504b26e6e96/ab9c73409659f3238d33faee304a8b7c/dotnet-hosting-8.0.4-win.exe</TgsDotnetRedistUrl>
<TgsDotnetRedistUrl>https://download.visualstudio.microsoft.com/download/pr/751d3fcd-72db-4da2-b8d0-709c19442225/33cc492bde704bfd6d70a2b9109005a0/dotnet-hosting-8.0.6-win.exe</TgsDotnetRedistUrl>
<TgsMariaDBRedistVersion>10.11.6</TgsMariaDBRedistVersion>
<TgsYarnVersion>1.22.21</TgsYarnVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Tgstation.Server.Api/Tgstation.Server.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- Usage: HTTP constants reference -->
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" />
<!-- Usage: Decoding the 'nbf' property of JWTs -->
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.5.1" />
<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 -->
Expand Down
4 changes: 2 additions & 2 deletions src/Tgstation.Server.Client/Tgstation.Server.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

<ItemGroup>
<!-- Usage: Connecting to SignalR hubs in API -->
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.6" />
<!-- Usage: Using target JSON serializer for API -->
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="8.0.6" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Tgstation.Server.Host/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.4",
"version": "8.0.6",
"commands": [
"dotnet-ef"
]
Expand Down
16 changes: 13 additions & 3 deletions src/Tgstation.Server.Host/Database/DatabaseContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,17 +375,17 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
/// <summary>
/// Used by unit tests to remind us to setup the correct MSSQL migration downgrades.
/// </summary>
internal static readonly Type MSLatestMigration = typeof(MSAddCompilerAdditionalArguments);
internal static readonly Type MSLatestMigration = typeof(MSSwitchTo64BitDeploymentIds);

/// <summary>
/// Used by unit tests to remind us to setup the correct MYSQL migration downgrades.
/// </summary>
internal static readonly Type MYLatestMigration = typeof(MYAddCompilerAdditionalArguments);
internal static readonly Type MYLatestMigration = typeof(MYSwitchTo64BitDeploymentIds);

/// <summary>
/// Used by unit tests to remind us to setup the correct PostgresSQL migration downgrades.
/// </summary>
internal static readonly Type PGLatestMigration = typeof(PGAddCompilerAdditionalArguments);
internal static readonly Type PGLatestMigration = typeof(PGSwitchTo64BitDeploymentIds);

/// <summary>
/// Used by unit tests to remind us to setup the correct SQLite migration downgrades.
Expand Down Expand Up @@ -419,6 +419,16 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)

string BadDatabaseType() => throw new ArgumentException($"Invalid DatabaseType: {currentDatabaseType}", nameof(currentDatabaseType));

if (targetVersion < new Version(6, 6, 0))
targetMigration = currentDatabaseType switch
{
DatabaseType.MySql => nameof(MYAddCompilerAdditionalArguments),
DatabaseType.PostgresSql => nameof(PGAddCompilerAdditionalArguments),
DatabaseType.SqlServer => nameof(MSAddCompilerAdditionalArguments),
DatabaseType.Sqlite => nameof(SLAddCompilerAdditionalArguments),
_ => BadDatabaseType(),
};

if (targetVersion < new Version(6, 5, 0))
targetMigration = currentDatabaseType switch
{
Expand Down
Loading

0 comments on commit 40d667f

Please sign in to comment.