From 064cecc24cd092aa8b15b07c74a8da2c4c881bf8 Mon Sep 17 00:00:00 2001 From: Peetu Saarinen Date: Mon, 26 May 2025 21:10:22 +0300 Subject: [PATCH 1/4] Include the original error message in the output --- Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs b/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs index e6ca91f..01e1d70 100644 --- a/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs +++ b/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs @@ -56,7 +56,7 @@ public static Result Execute( } var errorMessage = !string.IsNullOrEmpty(options.ErrorMessageOnFailure) - ? options.ErrorMessageOnFailure + ? $"{options.ErrorMessageOnFailure}: {e.Message}" : e.Message; return new Result From e57f2aa7a876ba22b7636b9dd4d33aac5491c292 Mon Sep 17 00:00:00 2001 From: Peetu Saarinen Date: Mon, 26 May 2025 21:11:09 +0300 Subject: [PATCH 2/4] Wrap the thrown exception before rethrowing --- Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs b/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs index 01e1d70..3587ded 100644 --- a/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs +++ b/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.cs @@ -50,7 +50,7 @@ public static Result Execute( if (options.ThrowErrorOnFailure) { if (string.IsNullOrEmpty(options.ErrorMessageOnFailure)) - throw; + throw new Exception(e.Message, e); throw new Exception(options.ErrorMessageOnFailure, e); } From 0867a91670befe344e01fa38a097ed4c34bd4742 Mon Sep 17 00:00:00 2001 From: Peetu Saarinen Date: Tue, 3 Jun 2025 10:29:06 +0300 Subject: [PATCH 3/4] Bump template version to 1.2.0 --- FrendsTaskTemplate.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrendsTaskTemplate.csproj b/FrendsTaskTemplate.csproj index cbe13f0..e2ea743 100644 --- a/FrendsTaskTemplate.csproj +++ b/FrendsTaskTemplate.csproj @@ -2,7 +2,7 @@ Template - 1.1.0 + 1.2.0 frendstasktemplate Frends Task template Frends From 03c82fd6c487feaa0e3ab2ab35b7d396696549e8 Mon Sep 17 00:00:00 2001 From: Peetu Saarinen Date: Tue, 3 Jun 2025 14:56:39 +0300 Subject: [PATCH 4/4] Bump from .NET 6.0 to .NET 8.0 --- .../Frends.Echo.Execute.Tests.csproj | 2 +- .../Frends.Echo.Execute/Frends.Echo.Execute.csproj | 2 +- Frends.Template/workflows/Execute_build_and_test_on_main.yml | 1 + Frends.Template/workflows/Execute_build_and_test_on_push.yml | 1 + Frends.Template/workflows/Execute_release.yml | 1 + README.md | 4 +--- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Frends.Template/Frends.Echo.Execute.Tests/Frends.Echo.Execute.Tests.csproj b/Frends.Template/Frends.Echo.Execute.Tests/Frends.Echo.Execute.Tests.csproj index 03f1d2e..8621dcb 100644 --- a/Frends.Template/Frends.Echo.Execute.Tests/Frends.Echo.Execute.Tests.csproj +++ b/Frends.Template/Frends.Echo.Execute.Tests/Frends.Echo.Execute.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false diff --git a/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.csproj b/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.csproj index 9c67d61..b40e85f 100644 --- a/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.csproj +++ b/Frends.Template/Frends.Echo.Execute/Frends.Echo.Execute.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 latest 1.0.0 Frends diff --git a/Frends.Template/workflows/Execute_build_and_test_on_main.yml b/Frends.Template/workflows/Execute_build_and_test_on_main.yml index 121eef6..bea9ca2 100644 --- a/Frends.Template/workflows/Execute_build_and_test_on_main.yml +++ b/Frends.Template/workflows/Execute_build_and_test_on_main.yml @@ -13,5 +13,6 @@ jobs: uses: FrendsPlatform/FrendsTasks/.github/workflows/linux_build_main.yml@main with: workdir: Frends.Echo.Execute + dotnet_version: 8.0.x secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} diff --git a/Frends.Template/workflows/Execute_build_and_test_on_push.yml b/Frends.Template/workflows/Execute_build_and_test_on_push.yml index f7d6d2a..8202eef 100644 --- a/Frends.Template/workflows/Execute_build_and_test_on_push.yml +++ b/Frends.Template/workflows/Execute_build_and_test_on_push.yml @@ -13,6 +13,7 @@ jobs: uses: FrendsPlatform/FrendsTasks/.github/workflows/linux_build_test.yml@main with: workdir: Frends.Echo.Execute + dotnet_version: 8.0.x secrets: badge_service_api_key: ${{ secrets.BADGE_SERVICE_API_KEY }} test_feed_api_key: ${{ secrets.TASKS_TEST_FEED_API_KEY }} diff --git a/Frends.Template/workflows/Execute_release.yml b/Frends.Template/workflows/Execute_release.yml index 0c061b1..2cd66b8 100644 --- a/Frends.Template/workflows/Execute_release.yml +++ b/Frends.Template/workflows/Execute_release.yml @@ -8,5 +8,6 @@ jobs: uses: FrendsPlatform/FrendsTasks/.github/workflows/release.yml@main with: workdir: Frends.Echo.Execute + dotnet_version: 8.0.x secrets: feed_api_key: ${{ secrets.TASKS_FEED_API_KEY }} diff --git a/README.md b/README.md index dbbe8dc..f005b96 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,7 @@ You can learn more about custom Tasks [here](https://docs.frends.com/en/articles ## Prerequisite You will need the [.NET SDK](https://dotnet.microsoft.com/en-us/download/dotnet), at -minimum [.NET SDK 6.0](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) is required. Since .NET 6.0 is EOL as of -2024-11-12, you should ideally use a newer version of the SDK, but Tasks should still target .NET 6.0 for the time -being. +minimum [.NET SDK 8.0](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) is required. Frends Tasks are usually written in C#, for the best experience you will want a compatible integrated development environment (IDE), some common examples are Visual Studio, Visual Studio Code and JetBrains Rider. You can also use any