Skip to content

Commit

Permalink
add support for net8
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbryant committed Nov 24, 2023
1 parent dacbc90 commit be6d063
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Farmer/Builders/Builders.Functions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/Farmer/Builders/Builders.WebApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 12 additions & 0 deletions src/Tests/WebApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Web.Site> |> 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 =
Expand Down

0 comments on commit be6d063

Please sign in to comment.