mirror of
https://github.com/Impostor/Impostor.git
synced 2026-11-19 13:17:05 +00:00
Switch to .NET 5.0
This commit is contained in:
1 parent
96549af414
commit
89da149697
9 files changed
+20
-17
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<TrimMode>Link</TrimMode>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<AssemblyTitle>Impostor.Server</AssemblyTitle>
|
||||
<Product>Impostor.Server</Product>
|
||||
<Copyright>Copyright © AeonLucid 2020</Copyright>
|
||||
@@ -18,8 +20,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.1.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.8" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.0-rc.1.20451.7" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0-rc.1.20451.14" />
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -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<ServerRedirectorConfig>();
|
||||
.Get<ServerRedirectorConfig>() ?? new ServerRedirectorConfig();
|
||||
|
||||
services.Configure<ServerConfig>(host.Configuration.GetSection(ServerConfig.Section));
|
||||
services.Configure<ServerRedirectorConfig>(host.Configuration.GetSection(ServerRedirectorConfig.Section));
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net452;netcoreapp3.1</TargetFrameworks>
|
||||
<TargetFrameworks>net452;net5.0</TargetFrameworks>
|
||||
<DebugType Condition=" '$(Configuration)' == 'Release' ">None</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.2.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0-preview-20200921-01" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
|
||||
<PackageReference Include="coverlet.collector" Version="1.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Submodule submodules/Hazel-Networking updated: 7ba3d5bed5...0c61aa426a.
Reference in new issue
Block a user