From: AeonLucid Date: Wed, 30 Sep 2020 22:48:59 +0000 (+0200) Subject: Switch to .NET 5.0 X-Git-Tag: v1.1.0~1^2~12 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=89da1496977e6770024b17c7bbcd671d63e511db;p=rhonda%2Fimpostor.git Switch to .NET 5.0 --- diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8b597c9..0674817 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.402 + dotnet-version: 5.0.100-rc.1.20452.10 - name: Install dependencies run: dotnet restore ./src - name: Build Impostor.Client diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d14e71..acc5a46 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.402 + dotnet-version: 5.0.100-rc.1.20452.10 - name: Install dependencies run: dotnet restore ./src - name: Build Impostor.Client diff --git a/Dockerfile b/Dockerfile index 280a1ad..4ac6b24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:5.0 AS build # See for all possible platforms # https://github.com/containerd/containerd/blob/master/platforms/platforms.go#L17 @@ -33,7 +33,7 @@ RUN case "$TARGETARCH" in \ dotnet publish -c release -o /app -r "$NETCORE_PLATFORM" --no-restore ./src/Impostor.Server/Impostor.Server.csproj # Final image. -FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/core/runtime-deps:3.1 +FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/runtime-deps:5.0 WORKDIR /app COPY --from=build /app ./ EXPOSE 22023/udp diff --git a/src/Impostor.Server/Data/ServerRedirectorConfig.cs b/src/Impostor.Server/Data/ServerRedirectorConfig.cs index fa45856..3233167 100644 --- a/src/Impostor.Server/Data/ServerRedirectorConfig.cs +++ b/src/Impostor.Server/Data/ServerRedirectorConfig.cs @@ -5,7 +5,7 @@ namespace Impostor.Server.Data public class ServerRedirectorConfig { public const string Section = "ServerRedirector"; - + public bool Enabled { get; set; } public bool Master { get; set; } public NodeLocator Locator { get; set; } diff --git a/src/Impostor.Server/Impostor.Server.csproj b/src/Impostor.Server/Impostor.Server.csproj index 20e46ed..f4979f1 100644 --- a/src/Impostor.Server/Impostor.Server.csproj +++ b/src/Impostor.Server/Impostor.Server.csproj @@ -2,8 +2,10 @@ Exe - netcoreapp3.1 + net5.0 true + Link + true Impostor.Server Impostor.Server Copyright © AeonLucid 2020 @@ -18,8 +20,8 @@ - - + + diff --git a/src/Impostor.Server/Program.cs b/src/Impostor.Server/Program.cs index b852db6..dfd5775 100644 --- a/src/Impostor.Server/Program.cs +++ b/src/Impostor.Server/Program.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using Impostor.Server.Data; using Impostor.Server.Net; using Impostor.Server.Net.Manager; @@ -57,7 +58,7 @@ namespace Impostor.Server { var redirector = host.Configuration .GetSection(ServerRedirectorConfig.Section) - .Get(); + .Get() ?? new ServerRedirectorConfig(); services.Configure(host.Configuration.GetSection(ServerConfig.Section)); services.Configure(host.Configuration.GetSection(ServerRedirectorConfig.Section)); diff --git a/src/Impostor.Shared/Impostor.Shared.csproj b/src/Impostor.Shared/Impostor.Shared.csproj index efa3f8f..a15b966 100644 --- a/src/Impostor.Shared/Impostor.Shared.csproj +++ b/src/Impostor.Shared/Impostor.Shared.csproj @@ -1,7 +1,8 @@ - net452;netcoreapp3.1 + net452;net5.0 + None diff --git a/src/Impostor.Tests/Impostor.Tests.csproj b/src/Impostor.Tests/Impostor.Tests.csproj index 88929eb..bc5a7cc 100644 --- a/src/Impostor.Tests/Impostor.Tests.csproj +++ b/src/Impostor.Tests/Impostor.Tests.csproj @@ -1,16 +1,15 @@ - netcoreapp3.1 - + net5.0 false - - - - + + + + diff --git a/submodules/Hazel-Networking b/submodules/Hazel-Networking index 7ba3d5b..0c61aa4 160000 --- a/submodules/Hazel-Networking +++ b/submodules/Hazel-Networking @@ -1 +1 @@ -Subproject commit 7ba3d5bed5d2609d6db829228908ae8e81ee54ee +Subproject commit 0c61aa426a2e47be9ac82c601c2f19b9345992a1