From 1627abb3f0b786ba8abcba5644504a266c8af9f0 Mon Sep 17 00:00:00 2001 From: Mattias Karlsson Date: Tue, 8 Nov 2022 23:36:35 +0100 Subject: [PATCH 1/2] (GH-176) Updated Cake tool to version 3.0.0 * fixes 176 --- .appveyor.yml | 3 +++ .github/workflows/build.yml | 7 ++++++- global.json | 2 +- recipe.cake | 1 + src/Cake.Bakery.Tests/Cake.Bakery.Tests.csproj | 8 ++++---- src/Cake.Bakery/Cake.Bakery.csproj | 8 ++++---- .../Cake.Scripting.Abstractions.csproj | 2 +- src/Cake.Scripting.Tests/Cake.Scripting.Tests.csproj | 12 ++++++------ .../Cake.Scripting.Transport.Tests.csproj | 8 ++++---- .../Cake.Scripting.Transport.csproj | 2 +- src/Cake.Scripting/Cake.Scripting.csproj | 9 +++++---- .../Reflection/ReferenceAssemblyResolver.cs | 7 ++++++- .../integration/Cake.Bakery.Tests.Integration.csproj | 6 +++--- 13 files changed, 45 insertions(+), 30 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index de554f8..d413e4e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,6 +10,9 @@ image: # Build Script # #---------------------------------# build_script: + - ps: Invoke-RestMethod -Uri 'https://dot.net/v1/dotnet-install.ps1' -OutFile '.\dotnet-install.ps1' + - ps: New-Item -Path .\.dotnet -ItemType Directory -Force | Out-Null + - ps: .\dotnet-install.ps1 -Channel 6.0 -InstallDir .\.dotnet - ps: .\build.ps1 --target=CI # Tests diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5496f1..3799df8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,8 +40,13 @@ jobs: - name: Fetch all tags and branches run: git fetch --prune --unshallow + - name: Install .NET SDK 6.0.x + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + - name: Install .NET Core SDK (global.json) - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 - name: Cache Tools uses: actions/cache@v2 diff --git a/global.json b/global.json index b18be33..f04f9d0 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.402", + "version": "7.0.100", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/recipe.cake b/recipe.cake index 33e7a70..e20ecca 100644 --- a/recipe.cake +++ b/recipe.cake @@ -175,6 +175,7 @@ Task("Init-Integration-Tests") DotNetCoreBuild("./tests/integration/Cake.Bakery.Tests.Integration.csproj", new DotNetCoreBuildSettings { Configuration = BuildParameters.Configuration, NoRestore = false, + Framework = "net6.0", OutputDirectory = "./tests/integration/bin" }); }); diff --git a/src/Cake.Bakery.Tests/Cake.Bakery.Tests.csproj b/src/Cake.Bakery.Tests/Cake.Bakery.Tests.csproj index aa50060..36bb3a2 100644 --- a/src/Cake.Bakery.Tests/Cake.Bakery.Tests.csproj +++ b/src/Cake.Bakery.Tests/Cake.Bakery.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net6.0;net7.0 true true @@ -13,9 +13,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Cake.Bakery/Cake.Bakery.csproj b/src/Cake.Bakery/Cake.Bakery.csproj index bc0f4d4..5c87d48 100644 --- a/src/Cake.Bakery/Cake.Bakery.csproj +++ b/src/Cake.Bakery/Cake.Bakery.csproj @@ -1,6 +1,6 @@  - net6.0 + net6.0;net7.0 true false Exe @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/Cake.Scripting.Abstractions/Cake.Scripting.Abstractions.csproj b/src/Cake.Scripting.Abstractions/Cake.Scripting.Abstractions.csproj index 1dcfd57..a94f0a2 100644 --- a/src/Cake.Scripting.Abstractions/Cake.Scripting.Abstractions.csproj +++ b/src/Cake.Scripting.Abstractions/Cake.Scripting.Abstractions.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net6.0 + netstandard2.0;net6.0;net7.0 true AnyCPU diff --git a/src/Cake.Scripting.Tests/Cake.Scripting.Tests.csproj b/src/Cake.Scripting.Tests/Cake.Scripting.Tests.csproj index 955d143..dc5e696 100644 --- a/src/Cake.Scripting.Tests/Cake.Scripting.Tests.csproj +++ b/src/Cake.Scripting.Tests/Cake.Scripting.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net6.0;net7.0 true true @@ -107,12 +107,12 @@ - - + + - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Cake.Scripting.Transport.Tests/Cake.Scripting.Transport.Tests.csproj b/src/Cake.Scripting.Transport.Tests/Cake.Scripting.Transport.Tests.csproj index 3e22213..4e8c47a 100644 --- a/src/Cake.Scripting.Transport.Tests/Cake.Scripting.Transport.Tests.csproj +++ b/src/Cake.Scripting.Transport.Tests/Cake.Scripting.Transport.Tests.csproj @@ -1,7 +1,7 @@  - net6.0 + net6.0;net7.0 true true @@ -27,9 +27,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Cake.Scripting.Transport/Cake.Scripting.Transport.csproj b/src/Cake.Scripting.Transport/Cake.Scripting.Transport.csproj index 7f00c68..677fd63 100644 --- a/src/Cake.Scripting.Transport/Cake.Scripting.Transport.csproj +++ b/src/Cake.Scripting.Transport/Cake.Scripting.Transport.csproj @@ -21,7 +21,7 @@ - + diff --git a/src/Cake.Scripting/Cake.Scripting.csproj b/src/Cake.Scripting/Cake.Scripting.csproj index 879afb5..2cf9162 100644 --- a/src/Cake.Scripting/Cake.Scripting.csproj +++ b/src/Cake.Scripting/Cake.Scripting.csproj @@ -1,6 +1,6 @@  - net6.0 + net6.0;net7.0 true AnyCPU @@ -12,10 +12,11 @@ - - + + - + + diff --git a/src/Cake.Scripting/Reflection/ReferenceAssemblyResolver.cs b/src/Cake.Scripting/Reflection/ReferenceAssemblyResolver.cs index 811d54c..2239164 100644 --- a/src/Cake.Scripting/Reflection/ReferenceAssemblyResolver.cs +++ b/src/Cake.Scripting/Reflection/ReferenceAssemblyResolver.cs @@ -20,7 +20,12 @@ public Assembly[] GetReferenceAssemblies() { IEnumerable TryGetReferenceAssemblies() { - foreach (var reference in Basic.Reference.Assemblies.Net60.All) + foreach (var reference in +#if NET6_0 + Basic.Reference.Assemblies.Net60.References.All) +#else + Basic.Reference.Assemblies.Net70.References.All) +#endif { Assembly assembly; try diff --git a/tests/integration/Cake.Bakery.Tests.Integration.csproj b/tests/integration/Cake.Bakery.Tests.Integration.csproj index c953706..e16c0a6 100644 --- a/tests/integration/Cake.Bakery.Tests.Integration.csproj +++ b/tests/integration/Cake.Bakery.Tests.Integration.csproj @@ -1,11 +1,11 @@ - net6.0 + net6.0;net7.0 Exe - - + + From 25cfae9473ea71114d5dd2c353c510797f3ebf26 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Wed, 9 Nov 2022 21:10:47 +0000 Subject: [PATCH 2/2] (build) Update DOTNET_VERSION To match what is in the global.json file. When building on Mac, the global.json file is not being passed to the install script like it is in the build.ps1 file. This should likely be made consistent at some point. --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index ae9594e..f196892 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ # Define varibles SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -DOTNET_VERSION="6.0.402" +DOTNET_VERSION="7.0.100" ########################################################################### # INSTALL .NET CORE CLI