From d6f6a5755d481cc435203796281004668ae12aaf Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Thu, 27 Jul 2023 11:00:26 -0700 Subject: [PATCH 1/5] Drop support for 'format' target. The dotnet-format tool is no longer being updated. Just use 'dotnet format' directly. --- src/Faithlife.Build/DotNetBuild.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/Faithlife.Build/DotNetBuild.cs b/src/Faithlife.Build/DotNetBuild.cs index 27ad7e8..e0a7477 100644 --- a/src/Faithlife.Build/DotNetBuild.cs +++ b/src/Faithlife.Build/DotNetBuild.cs @@ -621,17 +621,6 @@ Credentials ProvideDocsCredentials(string url, string usernameFromUrl, Supported } } - if (DotNetLocalTool.TryCreate("dotnet-format") is { } dotnetFormat) - { - build.Target("format") - .DependsOn("restore") - .Describe("Fixes coding style with dotnet-format") - .Does(() => - { - dotnetFormat.Run(settings.GetVerbosityArg()); - }); - } - if (DotNetLocalTool.TryCreate("jetbrains.resharper.globaltools") is { } jb) { build.Target("cleanup") From ba0d13d3aab81cbc150d77f4200e872116168aab Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Thu, 27 Jul 2023 11:31:05 -0700 Subject: [PATCH 2/5] Allow global JetBrains tool to be used. dotnet tool update --global jetbrains.resharper.globaltools --- src/Faithlife.Build/DotNetBuild.cs | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/Faithlife.Build/DotNetBuild.cs b/src/Faithlife.Build/DotNetBuild.cs index e0a7477..37249cf 100644 --- a/src/Faithlife.Build/DotNetBuild.cs +++ b/src/Faithlife.Build/DotNetBuild.cs @@ -621,21 +621,30 @@ Credentials ProvideDocsCredentials(string url, string usernameFromUrl, Supported } } - if (DotNetLocalTool.TryCreate("jetbrains.resharper.globaltools") is { } jb) + // allow global tool to be used (dotnet tool update --global jetbrains.resharper.globaltools) + var jb = DotNetLocalTool.TryCreate("jetbrains.resharper.globaltools"); + void RunJb(IEnumerable a) + { + if (jb is not null) + jb.Run(a); + else + RunApp("jb", a); + } + + if (jb is not null || FindFiles("*.DotSettings").Count != 0) { build.Target("cleanup") .DependsOn("restore") .Describe("Fixes coding style with JetBrains CleanupCode") .Does(() => { - jb.Run( - new[] - { - "cleanupcode", - "--profile=Build", - "--verbosity=ERROR", - "--disable-settings-layers:GlobalAll;GlobalPerProduct;SolutionPersonal;ProjectPersonal", - }.Concat(GetJetBrainsProperties()).Append(GetSolutionName())); + RunJb(new[] + { + "cleanupcode", + "--profile=Build", + "--verbosity=ERROR", + "--disable-settings-layers:GlobalAll;GlobalPerProduct;SolutionPersonal;ProjectPersonal", + }.Concat(GetJetBrainsProperties()).Append(GetSolutionName())); }); build.Target("inspect") @@ -645,7 +654,7 @@ Credentials ProvideDocsCredentials(string url, string usernameFromUrl, Supported { var outputPath = Path.Combine("release", "inspect.xml"); - jb.Run( + RunJb( new[] { "inspectcode", From 720b71b9b8516e464c2428371ef099b677520b93 Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Thu, 27 Jul 2023 11:33:16 -0700 Subject: [PATCH 3/5] Update dependencies. --- Directory.Build.props | 2 +- tests/Faithlife.Build.Tests/Faithlife.Build.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 1552f37..b16e19c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -34,7 +34,7 @@ - + diff --git a/tests/Faithlife.Build.Tests/Faithlife.Build.Tests.csproj b/tests/Faithlife.Build.Tests/Faithlife.Build.Tests.csproj index 679e127..12569fa 100644 --- a/tests/Faithlife.Build.Tests/Faithlife.Build.Tests.csproj +++ b/tests/Faithlife.Build.Tests/Faithlife.Build.Tests.csproj @@ -5,7 +5,7 @@ - + From ff9803687b7a2f94ba4b46fc1cd55bb85fb77bfc Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Thu, 27 Jul 2023 11:35:45 -0700 Subject: [PATCH 4/5] Drop unused NoWarn warnings. --- Directory.Build.props | 2 +- tools/Build/Build.csproj | 1 - tools/XmlDocGen/XmlDocGen.csproj | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index b16e19c..9e8d551 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ enable enable true - $(NoWarn);1591;1998;NU5105 + $(NoWarn);1591;1998 embedded Faithlife FaithlifeBuild diff --git a/tools/Build/Build.csproj b/tools/Build/Build.csproj index c17b06a..3fe661a 100644 --- a/tools/Build/Build.csproj +++ b/tools/Build/Build.csproj @@ -3,7 +3,6 @@ Exe net7.0 - $(NoWarn);CA1852 diff --git a/tools/XmlDocGen/XmlDocGen.csproj b/tools/XmlDocGen/XmlDocGen.csproj index 2a1f118..088d825 100644 --- a/tools/XmlDocGen/XmlDocGen.csproj +++ b/tools/XmlDocGen/XmlDocGen.csproj @@ -3,7 +3,6 @@ Exe net7.0 - $(NoWarn);CA1852 From 8e64eb1d20a7f8080e7bc68f1b5ff8ca0d4ec63e Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Thu, 27 Jul 2023 11:35:48 -0700 Subject: [PATCH 5/5] Publish 5.19.0. --- Directory.Build.props | 6 +----- ReleaseNotes.md | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 9e8d551..460b2f4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 5.18.1 + 5.19.0 11.0 enable enable @@ -37,8 +37,4 @@ - - $(NoWarn);NU5104 - - diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 622a04a..4abc040 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,10 @@ # Release Notes +## 5.19.0 + +* Allow global JetBrains tool to be used. (`dotnet tool update --global jetbrains.resharper.globaltools`) +* Drop support for `format` target. (The `dotnet-format` tool is no longer being updated. Just use `dotnet format` directly.) + ## 5.18.1 * Update dependencies to fix [CVE-2023-29337](https://github.com/advisories/GHSA-6qmf-mmc7-6c2p).