aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-11-20 19:30:29 -0600
committerGitHub <noreply@github.com>2021-11-20 19:30:29 -0600
commit3c44e9024c2dc796e0461eb25e69ab2589ff90c6 (patch)
tree924b7390cf8047fe8623cd5429a07a864b26b722
parent77bdd0d68209c7f2e11be0e3b10810dc8fc860aa (diff)
parentb22f310a999844b280c1f6978b8c7e125a852a7b (diff)
downloadslskd-3c44e9024c2dc796e0461eb25e69ab2589ff90c6.tar.gz
Merge pull request #272 from slskd/bump
Upgrade to .NET 6
-rw-r--r--Dockerfile4
-rw-r--r--src/slskd/Common/Compute.cs2
-rw-r--r--src/slskd/Common/Extensions.cs2
-rw-r--r--src/slskd/Integrations/FTP/FTPService.cs2
-rw-r--r--src/slskd/Startup.cs2
-rw-r--r--src/slskd/slskd.csproj12
-rw-r--r--tests/slskd.Tests.Integration/slskd.Tests.Integration.csproj2
-rw-r--r--tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj2
8 files changed, 14 insertions, 14 deletions
diff --git a/Dockerfile b/Dockerfile
index 92e19ccd..da5fd4de 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,7 +12,7 @@ RUN sh ./bin/build --web-only --version $VERSION
# build, test, and publish application binaries
# note: this needs to be pinned to an amd64 image in order to publish armv7 binaries
# https://github.com/dotnet/dotnet-docker/issues/1537#issuecomment-615269150
-FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim-amd64 AS publish
+FROM mcr.microsoft.com/dotnet/sdk:6.0-buster-slim-amd64 AS publish
ARG TARGETPLATFORM
ARG VERSION=0.0.1.65534-local
@@ -31,7 +31,7 @@ RUN bash ./bin/build --dotnet-only --version $VERSION
RUN bash ./bin/publish --no-prebuild --platform $TARGETPLATFORM --version $VERSION --output ../../dist/${TARGETPLATFORM}
# application
-FROM mcr.microsoft.com/dotnet/runtime-deps:5.0-buster-slim AS slskd
+FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-buster-slim AS slskd
ARG TARGETPLATFORM
ARG TAG=0.0.1
ARG VERSION=0.0.1.65534-local
diff --git a/src/slskd/Common/Compute.cs b/src/slskd/Common/Compute.cs
index 464a932d..eacaedf1 100644
--- a/src/slskd/Common/Compute.cs
+++ b/src/slskd/Common/Compute.cs
@@ -41,7 +41,7 @@ namespace slskd
public static string Sha1Hash(string str)
{
- using var sha1 = new SHA1Managed();
+ using var sha1 = SHA1.Create();
return BitConverter.ToString(sha1.ComputeHash(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty);
}
diff --git a/src/slskd/Common/Extensions.cs b/src/slskd/Common/Extensions.cs
index 678b790c..4d463092 100644
--- a/src/slskd/Common/Extensions.cs
+++ b/src/slskd/Common/Extensions.cs
@@ -295,7 +295,7 @@ namespace slskd
var options = new JsonSerializerOptions();
options.Converters.Add(new IPAddressConverter());
options.Converters.Add(new JsonStringEnumConverter());
- options.IgnoreNullValues = true;
+ options.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
return options;
}
}
diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs
index dd1b340f..32b8b253 100644
--- a/src/slskd/Integrations/FTP/FTPService.cs
+++ b/src/slskd/Integrations/FTP/FTPService.cs
@@ -62,7 +62,7 @@ namespace slskd.Integrations.FTP
{
if (!FtpOptions.Enabled)
{
- Log.LogDebug("Skipping FTP upload of {filename}; FTP integration is disabled");
+ Log.LogDebug("Skipping FTP upload of {filename}; FTP integration is disabled", filename);
return;
}
diff --git a/src/slskd/Startup.cs b/src/slskd/Startup.cs
index a8b64305..ac4a2789 100644
--- a/src/slskd/Startup.cs
+++ b/src/slskd/Startup.cs
@@ -169,7 +169,7 @@ namespace slskd
{
options.JsonSerializerOptions.Converters.Add(new IPAddressConverter());
options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
- options.JsonSerializerOptions.IgnoreNullValues = true;
+ options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
});
services.AddSignalR().AddJsonProtocol(options =>
diff --git a/src/slskd/slskd.csproj b/src/slskd/slskd.csproj
index 8e3739d9..5de36e78 100644
--- a/src/slskd/slskd.csproj
+++ b/src/slskd/slskd.csproj
@@ -8,7 +8,7 @@
</PropertyGroup>
<PropertyGroup>
- <TargetFramework>net5.0</TargetFramework>
+ <TargetFramework>net6.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<CodeAnalysisRuleSet>Properties\analysis.ruleset</CodeAnalysisRuleSet>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -43,15 +43,15 @@
<ItemGroup>
<PackageReference Include="FluentFTP" Version="35.0.5" />
- <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.11" />
+ <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" />
- <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
+ <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
- <PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.11" />
- <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.11" />
- <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.11" />
+ <PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.0" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.0" />
<PackageReference Include="prometheus-net" Version="5.0.1" />
<PackageReference Include="prometheus-net.AspNetCore" Version="5.0.1" />
<PackageReference Include="prometheus-net.AspNetCore.HealthChecks" Version="5.0.1" />
diff --git a/tests/slskd.Tests.Integration/slskd.Tests.Integration.csproj b/tests/slskd.Tests.Integration/slskd.Tests.Integration.csproj
index 89e935fa..ac1378c6 100644
--- a/tests/slskd.Tests.Integration/slskd.Tests.Integration.csproj
+++ b/tests/slskd.Tests.Integration/slskd.Tests.Integration.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net5.0</TargetFramework>
+ <TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
diff --git a/tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj b/tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj
index 569f124c..a3538c0a 100644
--- a/tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj
+++ b/tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net5.0</TargetFramework>
+ <TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>