From 34b06bd2fb2bf2964c2b3d3759af6681c60e5f3c Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 24 Mar 2022 00:32:44 +0100 Subject: [PATCH] Updating to net6.0 (#99) --- .github/workflows/build.yml | 2 +- .github/workflows/coding-style.yml | 2 +- .github/workflows/tests.yml | 4 ++-- .gitignore | 2 ++ Dockerfile | 4 ++-- src/Directory.Build.props | 2 ++ src/Kyoo.Abstractions/Kyoo.Abstractions.csproj | 2 -- src/Kyoo.Authentication/Controllers/PasswordUtils.cs | 2 ++ src/Kyoo.Authentication/Kyoo.Authentication.csproj | 6 ------ src/Kyoo.Core/Kyoo.Core.csproj | 2 -- src/Kyoo.Database/Kyoo.Database.csproj | 2 -- src/Kyoo.Host.Console/Kyoo.Host.Console.csproj | 2 -- src/Kyoo.Host.Generic/Kyoo.Host.Generic.csproj | 2 -- src/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj | 4 ++-- src/Kyoo.Postgresql/Kyoo.Postgresql.csproj | 2 -- src/Kyoo.SqLite/Kyoo.SqLite.csproj | 2 -- src/Kyoo.Swagger/Kyoo.Swagger.csproj | 2 -- src/Kyoo.TheMovieDb/Kyoo.TheMovieDb.csproj | 2 -- src/Kyoo.TheTvdb/Kyoo.TheTvdb.csproj | 2 -- src/Kyoo.WebApp/Kyoo.WebApp.csproj | 2 -- tests/Kyoo.Tests/Kyoo.Tests.csproj | 3 ++- 21 files changed, 16 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65aba8c6..5fa0b972 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.x + dotnet-version: 6.0.x - name: Install ffmpeg shell: bash run: | diff --git a/.github/workflows/coding-style.yml b/.github/workflows/coding-style.yml index 4ac803f6..97499167 100644 --- a/.github/workflows/coding-style.yml +++ b/.github/workflows/coding-style.yml @@ -10,6 +10,6 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.x + dotnet-version: 6.0.x - name: Build the app run: dotnet build -p:CheckCodingStyle=true -p:TreatWarningsAsErrors=true '-p:SkipTranscoder=true;SkipWebApp=true' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b05fd1c..84322bc5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ jobs: tests: runs-on: ubuntu-latest if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - container: mcr.microsoft.com/dotnet/sdk:5.0 + container: mcr.microsoft.com/dotnet/sdk:6.0 services: postgres: image: postgres @@ -24,7 +24,7 @@ jobs: - name: Build run: | dotnet build --no-restore '-p:SkipWebApp=true;SkipTranscoder=true' -p:CopyLocalLockFileAssemblies=true - cp ./src/Kyoo.Abstractions/bin/Debug/net5.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll ./tests/Kyoo.Tests/bin/Debug/net5.0/ + cp ./src/Kyoo.Abstractions/bin/Debug/net6.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll ./tests/Kyoo.Tests/bin/Debug/net6.0/ - name: Test run: dotnet test --no-build '-p:CollectCoverage=true;CoverletOutputFormat=opencover' --logger "trx;LogFileName=TestOutputResults.xml" env: diff --git a/.gitignore b/.gitignore index 33a6715a..694e9d6b 100644 --- a/.gitignore +++ b/.gitignore @@ -351,3 +351,5 @@ ASALocalRun/ # BeatPulse healthcheck temp database healthchecksdb /Kyoo/TheTVDB-Credentials.json + +.vscode diff --git a/Dockerfile b/Dockerfile index 51df1e69..cced5bb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,11 @@ RUN npm install -g @angular/cli RUN yarn install --frozen-lockfile RUN yarn run build --configuration production -FROM mcr.microsoft.com/dotnet/sdk:5.0 as builder +FROM mcr.microsoft.com/dotnet/sdk:6.0 as builder COPY . . RUN dotnet publish -c Release -o /opt/kyoo '-p:SkipWebApp=true;SkipTranscoder=true;CheckCodingStyle=false' src/Kyoo.Host.Console -FROM mcr.microsoft.com/dotnet/aspnet:5.0 +FROM mcr.microsoft.com/dotnet/aspnet:6.0 RUN apt-get update && apt-get install -y libavutil-dev libavcodec-dev libavformat-dev EXPOSE 5000 COPY --from=builder /opt/kyoo /usr/lib/kyoo diff --git a/src/Directory.Build.props b/src/Directory.Build.props index a8d58135..823f045a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,5 +1,7 @@ + net6.0 + default Kyoo Kyoo Copyright (c) Kyoo diff --git a/src/Kyoo.Abstractions/Kyoo.Abstractions.csproj b/src/Kyoo.Abstractions/Kyoo.Abstractions.csproj index 3bc50076..828bff86 100644 --- a/src/Kyoo.Abstractions/Kyoo.Abstractions.csproj +++ b/src/Kyoo.Abstractions/Kyoo.Abstractions.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.Abstractions Base package to create plugins for Kyoo. Kyoo.Abstractions diff --git a/src/Kyoo.Authentication/Controllers/PasswordUtils.cs b/src/Kyoo.Authentication/Controllers/PasswordUtils.cs index 5c071a4e..200c5346 100644 --- a/src/Kyoo.Authentication/Controllers/PasswordUtils.cs +++ b/src/Kyoo.Authentication/Controllers/PasswordUtils.cs @@ -45,7 +45,9 @@ namespace Kyoo.Authentication public static string HashPassword(string password) { byte[] salt = new byte[16]; +#pragma warning disable SYSLIB0023 new RNGCryptoServiceProvider().GetBytes(salt); +#pragma warning restore SYSLIB0023 Rfc2898DeriveBytes pbkdf2 = new(password, salt, 100000); byte[] hash = pbkdf2.GetBytes(20); byte[] hashBytes = new byte[36]; diff --git a/src/Kyoo.Authentication/Kyoo.Authentication.csproj b/src/Kyoo.Authentication/Kyoo.Authentication.csproj index 313f57ce..2940dc1f 100644 --- a/src/Kyoo.Authentication/Kyoo.Authentication.csproj +++ b/src/Kyoo.Authentication/Kyoo.Authentication.csproj @@ -1,13 +1,7 @@ - net5.0 ../Kyoo.WebLogin/ - - SDG - Zoe Roux - https://github.com/AnonymusRaccoon/Kyoo - default diff --git a/src/Kyoo.Core/Kyoo.Core.csproj b/src/Kyoo.Core/Kyoo.Core.csproj index 37490d89..740fff1e 100644 --- a/src/Kyoo.Core/Kyoo.Core.csproj +++ b/src/Kyoo.Core/Kyoo.Core.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.Core Kyoo.Core ../Kyoo.Transcoder/ diff --git a/src/Kyoo.Database/Kyoo.Database.csproj b/src/Kyoo.Database/Kyoo.Database.csproj index 5c59b7ef..b02d0279 100644 --- a/src/Kyoo.Database/Kyoo.Database.csproj +++ b/src/Kyoo.Database/Kyoo.Database.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.Database Kyoo.Database diff --git a/src/Kyoo.Host.Console/Kyoo.Host.Console.csproj b/src/Kyoo.Host.Console/Kyoo.Host.Console.csproj index d123b9e7..9bf7a116 100644 --- a/src/Kyoo.Host.Console/Kyoo.Host.Console.csproj +++ b/src/Kyoo.Host.Console/Kyoo.Host.Console.csproj @@ -1,8 +1,6 @@ Exe - net5.0 - default Kyoo.Host.Console Kyoo.Host.Console Kyoo.Host.Console.Program diff --git a/src/Kyoo.Host.Generic/Kyoo.Host.Generic.csproj b/src/Kyoo.Host.Generic/Kyoo.Host.Generic.csproj index 9ad8a264..9a82db8f 100644 --- a/src/Kyoo.Host.Generic/Kyoo.Host.Generic.csproj +++ b/src/Kyoo.Host.Generic/Kyoo.Host.Generic.csproj @@ -1,8 +1,6 @@ - net5.0 - default Kyoo.Host.Generic Kyoo.Host.Generic diff --git a/src/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj b/src/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj index 62cc27a3..b76edf01 100644 --- a/src/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj +++ b/src/Kyoo.Host.WindowsTrait/Kyoo.Host.WindowsTrait.csproj @@ -3,7 +3,7 @@ WinExe - net5.0-windows + net6.0-windows default true Kyoo.Host.WindowsTrait @@ -20,7 +20,7 @@ - net5.0 + net6.0 NU1503 diff --git a/src/Kyoo.Postgresql/Kyoo.Postgresql.csproj b/src/Kyoo.Postgresql/Kyoo.Postgresql.csproj index 8bb4ecf5..85ce27db 100644 --- a/src/Kyoo.Postgresql/Kyoo.Postgresql.csproj +++ b/src/Kyoo.Postgresql/Kyoo.Postgresql.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.Postgresql Kyoo.Postgresql diff --git a/src/Kyoo.SqLite/Kyoo.SqLite.csproj b/src/Kyoo.SqLite/Kyoo.SqLite.csproj index 24ba70c2..b999e5f6 100644 --- a/src/Kyoo.SqLite/Kyoo.SqLite.csproj +++ b/src/Kyoo.SqLite/Kyoo.SqLite.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.SqLite Kyoo.SqLite diff --git a/src/Kyoo.Swagger/Kyoo.Swagger.csproj b/src/Kyoo.Swagger/Kyoo.Swagger.csproj index 54d4e2f3..e4f5eba4 100644 --- a/src/Kyoo.Swagger/Kyoo.Swagger.csproj +++ b/src/Kyoo.Swagger/Kyoo.Swagger.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.Swagger Kyoo.Swagger diff --git a/src/Kyoo.TheMovieDb/Kyoo.TheMovieDb.csproj b/src/Kyoo.TheMovieDb/Kyoo.TheMovieDb.csproj index 93a5b921..0112e2dc 100644 --- a/src/Kyoo.TheMovieDb/Kyoo.TheMovieDb.csproj +++ b/src/Kyoo.TheMovieDb/Kyoo.TheMovieDb.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.TheMovieDb Kyoo.TheMovieDb diff --git a/src/Kyoo.TheTvdb/Kyoo.TheTvdb.csproj b/src/Kyoo.TheTvdb/Kyoo.TheTvdb.csproj index 354b9a35..9c62a86d 100644 --- a/src/Kyoo.TheTvdb/Kyoo.TheTvdb.csproj +++ b/src/Kyoo.TheTvdb/Kyoo.TheTvdb.csproj @@ -1,7 +1,5 @@ - net5.0 - default Kyoo.TheTvdb Kyoo.TheTvdb diff --git a/src/Kyoo.WebApp/Kyoo.WebApp.csproj b/src/Kyoo.WebApp/Kyoo.WebApp.csproj index 343b7d42..f4a4e8a7 100644 --- a/src/Kyoo.WebApp/Kyoo.WebApp.csproj +++ b/src/Kyoo.WebApp/Kyoo.WebApp.csproj @@ -2,8 +2,6 @@ - net5.0 - default Kyoo.WebApp Kyoo.WebApp diff --git a/tests/Kyoo.Tests/Kyoo.Tests.csproj b/tests/Kyoo.Tests/Kyoo.Tests.csproj index f51fc87a..e84fa386 100644 --- a/tests/Kyoo.Tests/Kyoo.Tests.csproj +++ b/tests/Kyoo.Tests/Kyoo.Tests.csproj @@ -1,7 +1,8 @@ - net5.0 + net6.0 default + false