From e2e0114770fb9fa97ab6eef3e7068d6aab0cd512 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 14 Nov 2023 13:53:57 -0500 Subject: [PATCH 1/4] Update .NET 8.0 release - Update Microsoft packages. - Update EF Core tooling. - Update Docker base images. - Update build scripts. - Update actions. --- .github/workflows/ci-pipeline.yml | 2 +- .github/workflows/code-scanning.yml | 2 +- build/Dockerfile | 4 ++-- build/Version.props | 2 +- build/package/deb/build_package.sh | 4 ++-- build/package/deb/debian/control | 4 ++-- .../Tgstation.Server.Client.csproj | 4 ++-- .../Tgstation.Server.Host.Console.csproj | 2 +- .../Tgstation.Server.Host.Service.csproj | 8 ++++---- .../Tgstation.Server.Host.Watchdog.csproj | 2 +- .../.config/dotnet-tools.json | 2 +- .../Tgstation.Server.Host.csproj | 20 +++++++++---------- .../Tgstation.Server.Client.Tests.csproj | 2 +- .../Tgstation.Server.Host.Tests.csproj | 2 +- .../Tgstation.Server.Tests.csproj | 2 +- .../Tgstation.Server.Migrator.csproj | 2 +- 16 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 290460f8ad..522f37e6f2 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -39,7 +39,7 @@ on: env: TGS_DOTNET_VERSION: 8 - TGS_DOTNET_QUALITY: preview + TGS_DOTNET_QUALITY: ga TGS_TEST_GITHUB_TOKEN: ${{ secrets.LIVE_TESTS_TOKEN }} TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} WINGET_PUSH_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} diff --git a/.github/workflows/code-scanning.yml b/.github/workflows/code-scanning.yml index 307500697d..9442ce5530 100644 --- a/.github/workflows/code-scanning.yml +++ b/.github/workflows/code-scanning.yml @@ -16,7 +16,7 @@ on: env: TGS_DOTNET_VERSION: 8 - TGS_DOTNET_QUALITY: preview + TGS_DOTNET_QUALITY: ga concurrency: group: "code-scanning-${{ github.head_ref || github.run_id }}-${{ github.event_name }}" diff --git a/build/Dockerfile b/build/Dockerfile index 9304b65d4b..383df77bfb 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0-preview-bookworm-slim AS build +FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build # install node and npm # replace shell with bash so we can source files @@ -49,7 +49,7 @@ RUN dotnet publish -c Release -o /app/lib/Default \ && build/RemoveUnsupportedRuntimes.sh /app/lib/Default \ && mv /app/lib/Default/appsettings* /app -FROM mcr.microsoft.com/dotnet/aspnet:8.0-preview-bookworm-slim +FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim #needed for byond RUN apt-get update \ diff --git a/build/Version.props b/build/Version.props index c08eccf5ff..a033a4e181 100644 --- a/build/Version.props +++ b/build/Version.props @@ -17,7 +17,7 @@ netstandard2.0 8 - https://download.visualstudio.microsoft.com/download/pr/f0a627b7-bd46-4ed2-978d-00a445174074/182420f488062f1983fc392b2fb66967/dotnet-hosting-8.0.0-rc.2.23480.2-win.exe + https://download.visualstudio.microsoft.com/download/pr/2a7ae819-fbc4-4611-a1ba-f3b072d4ea25/32f3b931550f7b315d9827d564202eeb/dotnet-hosting-8.0.0-win.exe 10.11.6 1.22.19 diff --git a/build/package/deb/build_package.sh b/build/package/deb/build_package.sh index 79f2e57244..8f55150d32 100755 --- a/build/package/deb/build_package.sh +++ b/build/package/deb/build_package.sh @@ -19,8 +19,8 @@ apt-get install -y \ ca-certificates \ curl \ gnupg \ - xmlstarlet -# dotnet-sdk-8.0 # Disabled while in preview + xmlstarlet \ + dotnet-sdk-8.0 # https://github.com/nodesource/distributions mkdir -p /etc/apt/keyrings diff --git a/build/package/deb/debian/control b/build/package/deb/debian/control index a63d1d0fab..f0a7ecbbe3 100644 --- a/build/package/deb/debian/control +++ b/build/package/deb/debian/control @@ -6,7 +6,7 @@ Rules-Requires-Root: no Build-Depends: debhelper-compat (= 13), nodejs, -#dotnet-sdk-8.0, Disabled while in preview + dotnet-sdk-8.0, Standards-Version: 4.6.2 Homepage: https://tgstation.github.io/tgstation-server Vcs-Browser: https://github.com/tgstation/tgstation-server @@ -16,7 +16,7 @@ Package: tgstation-server Architecture: any Depends: ${misc:Depends}, -#aspnetcore-runtime-8.0, Disabled while in preview + aspnetcore-runtime-8.0, libc6-i386, libstdc++6:i386 [amd64], libstdc++6 [i386], diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj index 3b62a38903..21eff94c4b 100644 --- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj +++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj @@ -12,9 +12,9 @@ - + - + diff --git a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj index 89392d1fb6..92902912bb 100644 --- a/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj +++ b/src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj index a7c6d3c406..aa98536f38 100644 --- a/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj +++ b/src/Tgstation.Server.Host.Service/Tgstation.Server.Host.Service.csproj @@ -19,15 +19,15 @@ - + - + - + - + diff --git a/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj b/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj index 5428b3b848..ae3b89cdb2 100644 --- a/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj +++ b/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Tgstation.Server.Host/.config/dotnet-tools.json b/src/Tgstation.Server.Host/.config/dotnet-tools.json index 7bf2190465..c03564f970 100644 --- a/src/Tgstation.Server.Host/.config/dotnet-tools.json +++ b/src/Tgstation.Server.Host/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "8.0.0-rc.2.23479.6", + "version": "8.0.0", "commands": [ "dotnet-ef" ] diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index d42f52b825..33a2f815b3 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -75,21 +75,21 @@ - + - + - + - + - + runtime; build; native; contentfiles; analyzers; buildtransitive - + - + @@ -117,13 +117,13 @@ - + - + - + diff --git a/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj b/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj index cfc5f1ae7e..c2c09fe7b8 100644 --- a/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj +++ b/tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj @@ -6,7 +6,7 @@ - + diff --git a/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj b/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj index f0f88a74b5..331d95e564 100644 --- a/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj +++ b/tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj @@ -6,7 +6,7 @@ - + diff --git a/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj b/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj index dc0fbd8f54..bbcbbc86ed 100644 --- a/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj +++ b/tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj @@ -6,7 +6,7 @@ - + diff --git a/tools/Tgstation.Server.Migrator/Tgstation.Server.Migrator.csproj b/tools/Tgstation.Server.Migrator/Tgstation.Server.Migrator.csproj index c445f31201..2511e50c18 100644 --- a/tools/Tgstation.Server.Migrator/Tgstation.Server.Migrator.csproj +++ b/tools/Tgstation.Server.Migrator/Tgstation.Server.Migrator.csproj @@ -14,7 +14,7 @@ - + From 1b661d8e3fdfb307bd9f9ea832f23732c7d81bed Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 14 Nov 2023 16:58:35 -0500 Subject: [PATCH 2/4] Always install .NET from Microsoft Ubuntu repo Can't be assed to wait for releases --- build/package/deb/build_package.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build/package/deb/build_package.sh b/build/package/deb/build_package.sh index 8f55150d32..0732f96486 100755 --- a/build/package/deb/build_package.sh +++ b/build/package/deb/build_package.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Run from git root +# Run from git root, certified for ubuntu only since that's what gha uses SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) @@ -19,8 +19,12 @@ apt-get install -y \ ca-certificates \ curl \ gnupg \ - xmlstarlet \ - dotnet-sdk-8.0 + xmlstarlet + +declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi) +curl -L https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -o packages-microsoft-prod.deb +dpkg -i ./packages-microsoft-prod.deb +rm packages-microsoft-prod.deb # https://github.com/nodesource/distributions mkdir -p /etc/apt/keyrings @@ -28,7 +32,7 @@ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dea export NODE_MAJOR=20 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list apt-get update -apt-get install nodejs -y +apt-get install nodejs dotnet-sdk-8.0 -y CURRENT_COMMIT=$(git rev-parse HEAD) From d2a861415ae2eec487977b250defdd795b1a3425 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 14 Nov 2023 17:26:47 -0500 Subject: [PATCH 3/4] Update to latest EFCore extensions version --- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 33a2f815b3..ece85029e7 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -125,7 +125,7 @@ - + From 51e64951afe0904664293e2953dab69b70bf5a6f Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 14 Nov 2023 22:52:38 -0500 Subject: [PATCH 4/4] Prevent the `RootController` from being included in the API --- src/Tgstation.Server.Host/Controllers/RootController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Tgstation.Server.Host/Controllers/RootController.cs b/src/Tgstation.Server.Host/Controllers/RootController.cs index fd1bf36b11..850785d612 100644 --- a/src/Tgstation.Server.Host/Controllers/RootController.cs +++ b/src/Tgstation.Server.Host/Controllers/RootController.cs @@ -15,6 +15,7 @@ namespace Tgstation.Server.Host.Controllers /// The root path . /// [Route("/")] + [ApiExplorerSettings(IgnoreApi = true)] public sealed class RootController : Controller { ///