From be6d06387c96cd3ac3e1946f93fe328d35b917ee Mon Sep 17 00:00:00 2001 From: Martin Bryant Date: Fri, 24 Nov 2023 15:44:14 +0000 Subject: [PATCH 1/3] add support for net8 --- src/Farmer/Builders/Builders.Functions.fs | 2 +- src/Farmer/Builders/Builders.WebApp.fs | 1 + src/Tests/WebApp.fs | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Farmer/Builders/Builders.Functions.fs b/src/Farmer/Builders/Builders.Functions.fs index 03e59b81b..0b6af0952 100644 --- a/src/Farmer/Builders/Builders.Functions.fs +++ b/src/Farmer/Builders/Builders.Functions.fs @@ -334,7 +334,7 @@ type FunctionsConfig = | _, Some version -> Some $"{functionsRuntime.ToUpper()}|{version}" | _, None -> None NetFrameworkVersion = - let possibleVersions = [ "4.0"; "6.0"; "7.0" ] + let possibleVersions = [ "4.0"; "6.0"; "7.0"; "8.0" ] match this.VersionedRuntime with | (DotNet diff --git a/src/Farmer/Builders/Builders.WebApp.fs b/src/Farmer/Builders/Builders.WebApp.fs index fc0508dc6..cc2b4eed4 100644 --- a/src/Farmer/Builders/Builders.WebApp.fs +++ b/src/Farmer/Builders/Builders.WebApp.fs @@ -70,6 +70,7 @@ type Runtime = static member Java8WildFly14 = Java(Java8, WildFly14) static member Java8Tomcat90 = Java(Java8, JavaHost.Tomcat90) static member Java8Tomcat85 = Java(Java8, JavaHost.Tomcat85) + static member DotNet80 = DotNet "8.0" static member DotNet70 = DotNet "7.0" static member DotNet60 = DotNet "6.0" static member DotNet50 = DotNet "5.0" diff --git a/src/Tests/WebApp.fs b/src/Tests/WebApp.fs index 0d434b3ad..a09c766f2 100644 --- a/src/Tests/WebApp.fs +++ b/src/Tests/WebApp.fs @@ -720,6 +720,18 @@ let tests = Expect.equal site.NetFrameworkVersion.Value "v7.0" "Wrong dotnet version" Expect.equal site.Metadata.Head ("CURRENT_STACK", "dotnet") "Stack should be dotnet" } + + test "Supports .NET 8" { + let app = + webApp { + name "net8" + runtime_stack Runtime.DotNet80 + } + + let site = app |> getResources |> getResource |> List.head + Expect.equal site.NetFrameworkVersion.Value "v8.0" "Wrong dotnet version" + Expect.equal site.Metadata.Head ("CURRENT_STACK", "dotnet") "Stack should be dotnet" + } test "Supports .NET 5 on Linux" { let app = From 9bac7d63aaf5cd682874da63ba8bc8771e8f2406 Mon Sep 17 00:00:00 2001 From: Martin Bryant Date: Fri, 24 Nov 2023 15:50:10 +0000 Subject: [PATCH 2/3] update release notes --- RELEASE_NOTES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1d47a1c11..4c14a88e4 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,9 @@ Release Notes ============= +## 1.8.2 +* Dotnet 8: Added runtime support for functions + ## 1.8.1 * Bastion Hosts: Supports advanced settings for bastion hosts, such as native client tunneling. * Virtual Machines and Scale Sets: Support for deploying gallery applications to a VM or VM Scale Set. From f4af5def056a670aa505991d5adf09bd6f5497db Mon Sep 17 00:00:00 2001 From: Dave Curylo Date: Mon, 4 Dec 2023 08:20:34 -0500 Subject: [PATCH 3/3] Formatting fixes --- src/Tests/WebApp.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/WebApp.fs b/src/Tests/WebApp.fs index a09c766f2..127d61a15 100644 --- a/src/Tests/WebApp.fs +++ b/src/Tests/WebApp.fs @@ -720,7 +720,7 @@ let tests = Expect.equal site.NetFrameworkVersion.Value "v7.0" "Wrong dotnet version" Expect.equal site.Metadata.Head ("CURRENT_STACK", "dotnet") "Stack should be dotnet" } - + test "Supports .NET 8" { let app = webApp {