diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 41a11a3da..88179b74b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,7 +13,7 @@ variables: buildName: '$(Build.SourceBranchName).$(radarrVersion)' sentryOrg: 'servarr' sentryUrl: 'https://sentry.servarr.com' - dotnetVersion: '5.0.401' + dotnetVersion: '6.0.100' yarnCacheFolder: $(Pipeline.Workspace)/.yarn trigger: @@ -111,23 +111,23 @@ stages: artifact: '$(osName)Backend' displayName: Publish Backend condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net5.0/win-x64/publish' + - publish: '$(testsFolder)/net6.0/win-x64/publish' artifact: WindowsCoreTests displayName: Publish Windows Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net5.0/linux-x64/publish' + - publish: '$(testsFolder)/net6.0/linux-x64/publish' artifact: LinuxCoreTests displayName: Publish Linux Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net5.0/linux-musl-x64/publish' + - publish: '$(testsFolder)/net6.0/linux-musl-x64/publish' artifact: LinuxMuslCoreTests displayName: Publish Linux Musl Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net5.0/freebsd-x64/publish' + - publish: '$(testsFolder)/net6.0/freebsd-x64/publish' artifact: FreebsdCoreTests displayName: Publish FreeBSD Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) - - publish: '$(testsFolder)/net5.0/osx-x64/publish' + - publish: '$(testsFolder)/net6.0/osx-x64/publish' artifact: MacCoreTests displayName: Publish MacOS Test Package condition: and(succeeded(), eq(variables['osName'], 'Windows')) @@ -203,12 +203,12 @@ stages: - bash: ./build.sh --packages displayName: Create Packages - bash: | - setup/inno/ISCC.exe setup/radarr.iss //DFramework=net5.0 //DRuntime=win-x86 - cp setup/output/Radarr.*windows.net5.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe + setup/inno/ISCC.exe setup/radarr.iss //DFramework=net6.0 //DRuntime=win-x86 + cp setup/output/Radarr.*windows.net6.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x86-installer.exe displayName: Create .NET Core Windows installer - bash: | - setup/inno/ISCC.exe setup/radarr.iss //DFramework=net5.0 //DRuntime=win-x64 - cp setup/output/Radarr.*windows.net5.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe + setup/inno/ISCC.exe setup/radarr.iss //DFramework=net6.0 //DRuntime=win-x64 + cp setup/output/Radarr.*windows.net6.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Radarr.${BUILDNAME}.windows-core-x64-installer.exe displayName: Create .NET Core Windows installer - publish: $(Build.ArtifactStagingDirectory) artifact: 'WindowsInstaller' @@ -251,21 +251,21 @@ stages: archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/win-x64/net5.0 + rootFolderOrFile: $(artifactsFolder)/win-x64/net6.0 - task: ArchiveFiles@2 displayName: Create Windows x86 Core zip inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).windows-core-x86.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/win-x86/net5.0 + rootFolderOrFile: $(artifactsFolder)/win-x86/net6.0 - task: ArchiveFiles@2 displayName: Create MacOS Core app inputs: archiveFile: '$(Build.ArtifactStagingDirectory)/Radarr.$(buildName).osx-app-core-x64.zip' archiveType: 'zip' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/macos-app/net5.0 + rootFolderOrFile: $(artifactsFolder)/macos-app/net6.0 - task: ArchiveFiles@2 displayName: Create MacOS Core tar inputs: @@ -273,7 +273,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/macos/net5.0 + rootFolderOrFile: $(artifactsFolder)/macos/net6.0 - task: ArchiveFiles@2 displayName: Create Linux Core tar inputs: @@ -281,7 +281,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-x64/net5.0 + rootFolderOrFile: $(artifactsFolder)/linux-x64/net6.0 - task: ArchiveFiles@2 displayName: Create Linux Musl Core tar inputs: @@ -289,7 +289,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net5.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-x64/net6.0 - task: ArchiveFiles@2 displayName: Create ARM32 Linux Core tar inputs: @@ -297,7 +297,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-arm/net5.0 + rootFolderOrFile: $(artifactsFolder)/linux-arm/net6.0 - task: ArchiveFiles@2 displayName: Create ARM64 Linux Core tar inputs: @@ -305,7 +305,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-arm64/net5.0 + rootFolderOrFile: $(artifactsFolder)/linux-arm64/net6.0 - task: ArchiveFiles@2 displayName: Create ARM64 Linux Musl Core tar inputs: @@ -313,7 +313,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net5.0 + rootFolderOrFile: $(artifactsFolder)/linux-musl-arm64/net6.0 - task: ArchiveFiles@2 displayName: Create FreeBSD Core Core tar inputs: @@ -321,7 +321,7 @@ stages: archiveType: 'tar' tarCompression: 'gz' includeRootFolder: false - rootFolderOrFile: $(artifactsFolder)/freebsd-x64/net5.0 + rootFolderOrFile: $(artifactsFolder)/freebsd-x64/net6.0 - publish: $(Build.ArtifactStagingDirectory) artifact: 'Packages' displayName: Publish Packages @@ -866,8 +866,8 @@ stages: sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml - bash: | - ./build.sh --backend -f net5.0 -r win-x64 - TEST_DIR=_tests/net5.0/win-x64/publish/ ./test.sh Windows Unit Coverage + ./build.sh --backend -f net6.0 -r win-x64 + TEST_DIR=_tests/net6.0/win-x64/publish/ ./test.sh Windows Unit Coverage displayName: Coverage Unit Tests - task: SonarCloudAnalyze@1 condition: eq(variables['System.PullRequest.IsFork'], 'False') diff --git a/build.sh b/build.sh index baa6873c9..c96cd7de9 100755 --- a/build.sh +++ b/build.sh @@ -129,7 +129,7 @@ PackageLinux() echo "Adding Radarr.Mono to UpdatePackage" cp $folder/Radarr.Mono.* $folder/Radarr.Update - if [ "$framework" = "net5.0" ]; then + if [ "$framework" = "net6.0" ]; then cp $folder/Mono.Posix.NETStandard.* $folder/Radarr.Update cp $folder/libMonoPosixHelper.* $folder/Radarr.Update fi @@ -156,7 +156,7 @@ PackageMacOS() echo "Adding Radarr.Mono to UpdatePackage" cp $folder/Radarr.Mono.* $folder/Radarr.Update - if [ "$framework" = "net5.0" ]; then + if [ "$framework" = "net6.0" ]; then cp $folder/Mono.Posix.NETStandard.* $folder/Radarr.Update cp $folder/libMonoPosixHelper.* $folder/Radarr.Update fi @@ -326,14 +326,14 @@ then Build if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then - PackageTests "net5.0" "win-x64" - PackageTests "net5.0" "win-x86" - PackageTests "net5.0" "linux-x64" - PackageTests "net5.0" "linux-musl-x64" - PackageTests "net5.0" "osx-x64" + PackageTests "net6.0" "win-x64" + PackageTests "net6.0" "win-x86" + PackageTests "net6.0" "linux-x64" + PackageTests "net6.0" "linux-musl-x64" + PackageTests "net6.0" "osx-x64" if [ "$ENABLE_BSD" = "YES" ]; then - PackageTests "net5.0" "freebsd-x64" + PackageTests "net6.0" "freebsd-x64" fi else PackageTests "$FRAMEWORK" "$RID" @@ -362,17 +362,17 @@ then if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then - Package "net5.0" "win-x64" - Package "net5.0" "win-x86" - Package "net5.0" "linux-x64" - Package "net5.0" "linux-musl-x64" - Package "net5.0" "linux-arm64" - Package "net5.0" "linux-musl-arm64" - Package "net5.0" "linux-arm" - Package "net5.0" "osx-x64" + Package "net6.0" "win-x64" + Package "net6.0" "win-x86" + Package "net6.0" "linux-x64" + Package "net6.0" "linux-musl-x64" + Package "net6.0" "linux-arm64" + Package "net6.0" "linux-musl-arm64" + Package "net6.0" "linux-arm" + Package "net6.0" "osx-x64" if [ "$ENABLE_BSD" = "YES" ]; then - Package "net5.0" "freebsd-x64" + Package "net6.0" "freebsd-x64" fi else Package "$FRAMEWORK" "$RID" diff --git a/package.json b/package.json index eeb33d79a..f48f5eb9d 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "@fortawesome/free-regular-svg-icons": "5.15.3", "@fortawesome/free-solid-svg-icons": "5.15.3", "@fortawesome/react-fontawesome": "0.1.14", - "@microsoft/signalr": "5.0.10", + "@microsoft/signalr": "6.0.0", "@sentry/browser": "6.13.2", "@sentry/integrations": "6.13.2", "classnames": "2.3.1", @@ -82,6 +82,7 @@ }, "devDependencies": { "@babel/core": "7.13.16", + "@babel/eslint-parser": "7.13.14", "@babel/plugin-proposal-class-properties": "7.13.0", "@babel/plugin-proposal-decorators": "7.13.15", "@babel/plugin-proposal-export-default-from": "7.12.13", @@ -94,7 +95,6 @@ "@babel/plugin-syntax-dynamic-import": "7.8.3", "@babel/preset-env": "7.13.15", "@babel/preset-react": "7.13.13", - "@babel/eslint-parser": "7.13.14", "autoprefixer": "10.2.5", "babel-loader": "8.2.2", "babel-plugin-inline-classnames": "2.0.1", @@ -125,12 +125,12 @@ "run-sequence": "2.2.1", "streamqueue": "1.1.2", "style-loader": "2.0.0", + "stylelint": "13.13.0", + "stylelint-order": "4.1.0", "url-loader": "4.1.1", "webpack": "5.35.1", "webpack-cli": "4.6.0", "webpack-livereload-plugin": "3.0.1", - "worker-loader": "3.0.8", - "stylelint": "13.13.0", - "stylelint-order": "4.1.0" + "worker-loader": "3.0.8" } } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 6499fb56e..f12cb501d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,6 +2,7 @@ true + false AnyCPU true @@ -89,13 +90,13 @@ - + - + diff --git a/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj b/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj index 54e9639b1..9bfecde2c 100644 --- a/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj +++ b/src/NzbDrone.Api.Test/Radarr.Api.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 diff --git a/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj b/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj index 13b6acb22..8e8212080 100644 --- a/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj +++ b/src/NzbDrone.Automation.Test/Radarr.Automation.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 diff --git a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs index c3d268a42..4ee2c24c1 100644 --- a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs +++ b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs @@ -819,7 +819,7 @@ namespace NzbDrone.Common.Test.Http { try { - string url = $"https://{_httpBinHost}/response-headers?Set-Cookie={Uri.EscapeUriString(malformedCookie)}"; + string url = $"https://{_httpBinHost}/response-headers?Set-Cookie={Uri.EscapeDataString(malformedCookie)}"; var requestSet = new HttpRequest(url); requestSet.AllowAutoRedirect = false; diff --git a/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj b/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj index c2495d284..3726a01c7 100644 --- a/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/Radarr.Common.Test.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index a75c3c676..913a6c801 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Common.EnvironmentInfo serviceProvider.ServiceExist(ServiceProvider.SERVICE_NAME) && serviceProvider.GetStatus(ServiceProvider.SERVICE_NAME) == ServiceControllerStatus.StartPending; - // net5.0 will return Radarr.dll for entry assembly, we need the actual + // net6.0 will return Radarr.dll for entry assembly, we need the actual // executable name (Radarr on linux). On mono this will return the location of // the mono executable itself, which is not what we want. var entry = Process.GetCurrentProcess().MainModule; diff --git a/src/NzbDrone.Common/Extensions/IEnumerableExtensions.cs b/src/NzbDrone.Common/Extensions/IEnumerableExtensions.cs index deb75de1e..5c3c22f65 100644 --- a/src/NzbDrone.Common/Extensions/IEnumerableExtensions.cs +++ b/src/NzbDrone.Common/Extensions/IEnumerableExtensions.cs @@ -6,13 +6,6 @@ namespace NzbDrone.Common.Extensions { public static class EnumerableExtensions { - public static IEnumerable DistinctBy(this IEnumerable source, Func keySelector) - { - var knownKeys = new HashSet(); - - return source.Where(element => knownKeys.Add(keySelector(element))); - } - public static IEnumerable IntersectBy(this IEnumerable first, Func firstKeySelector, IEnumerable second, diff --git a/src/NzbDrone.Common/Radarr.Common.csproj b/src/NzbDrone.Common/Radarr.Common.csproj index 499df6da5..664b51761 100644 --- a/src/NzbDrone.Common/Radarr.Common.csproj +++ b/src/NzbDrone.Common/Radarr.Common.csproj @@ -1,24 +1,24 @@  - net5.0 + net6.0 ISMUSL - + - + - + - + diff --git a/src/NzbDrone.Console/Radarr.Console.csproj b/src/NzbDrone.Console/Radarr.Console.csproj index bac151faa..b692b9bbd 100644 --- a/src/NzbDrone.Console/Radarr.Console.csproj +++ b/src/NzbDrone.Console/Radarr.Console.csproj @@ -1,7 +1,7 @@ Exe - net5.0 + net6.0 ..\NzbDrone.Host\Radarr.ico app.manifest diff --git a/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj b/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj index 63b8ea6f6..ef7bd9b70 100644 --- a/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/Radarr.Core.Test.csproj @@ -1,6 +1,6 @@  - net5.0 + net6.0 diff --git a/src/NzbDrone.Core/Hashing.cs b/src/NzbDrone.Core/Hashing.cs index 531de210d..761255a6e 100644 --- a/src/NzbDrone.Core/Hashing.cs +++ b/src/NzbDrone.Core/Hashing.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core { public static string SHA256Hash(this string input) { - using (var hash = SHA256Managed.Create()) + using (var hash = SHA256.Create()) { var enc = Encoding.UTF8; return GetHash(hash.ComputeHash(enc.GetBytes(input))); @@ -17,7 +17,7 @@ namespace NzbDrone.Core public static string SHA256Hash(this Stream input) { - using (var hash = SHA256Managed.Create()) + using (var hash = SHA256.Create()) { return GetHash(hash.ComputeHash(input)); } diff --git a/src/NzbDrone.Core/Radarr.Core.csproj b/src/NzbDrone.Core/Radarr.Core.csproj index e5dbfcf1a..fe00292e7 100644 --- a/src/NzbDrone.Core/Radarr.Core.csproj +++ b/src/NzbDrone.Core/Radarr.Core.csproj @@ -1,15 +1,15 @@  - net5.0 + net6.0 - - - + + + @@ -18,7 +18,7 @@ - + diff --git a/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj b/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj index 1268019ce..23c9f2249 100644 --- a/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj +++ b/src/NzbDrone.Host.Test/Radarr.Host.Test.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 diff --git a/src/NzbDrone.Host/Radarr.Host.csproj b/src/NzbDrone.Host/Radarr.Host.csproj index 307f662b6..4b93e5e41 100644 --- a/src/NzbDrone.Host/Radarr.Host.csproj +++ b/src/NzbDrone.Host/Radarr.Host.csproj @@ -1,11 +1,11 @@  - net5.0 + net6.0 Library - - + + diff --git a/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj b/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj index f59016ee4..1c9c1a63b 100644 --- a/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/Radarr.Integration.Test.csproj @@ -1,10 +1,10 @@  - net5.0 + net6.0 Library - + diff --git a/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj index d9c4c6ebd..e62c371b8 100644 --- a/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/Radarr.Libraries.Test.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 diff --git a/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj b/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj index e7ce864c4..ab15421a7 100644 --- a/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/Radarr.Mono.Test.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0