From a5a136f982f19043cf4cf3236db1ac2d17c8a266 Mon Sep 17 00:00:00 2001 From: Stuart Lang Date: Mon, 11 May 2020 11:29:31 +0100 Subject: [PATCH] feat(Templates): Update aws-fsharp to netcoreapp3.1 (#7709) --- docker-compose.yml | 2 +- .../aws/examples/hello-world/fsharp/README.md | 2 +- lib/plugins/create/templates/aws-fsharp/Handler.fs | 2 +- .../create/templates/aws-fsharp/aws-fsharp.fsproj | 10 +++------- lib/plugins/create/templates/aws-fsharp/build.cmd | 4 +++- lib/plugins/create/templates/aws-fsharp/build.sh | 3 ++- lib/plugins/create/templates/aws-fsharp/serverless.yml | 4 ++-- 7 files changed, 13 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5c051b5de..a3a50ba08 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: volumes: - ./tmp/serverless-integration-test-aws-csharp:/app aws-fsharp: - image: microsoft/dotnet:2.0-sdk + image: mcr.microsoft.com/dotnet/core/sdk:3.1 volumes: - ./tmp/serverless-integration-test-aws-fsharp:/app aws-go: diff --git a/docs/providers/aws/examples/hello-world/fsharp/README.md b/docs/providers/aws/examples/hello-world/fsharp/README.md index ea2563343..e918bbf33 100644 --- a/docs/providers/aws/examples/hello-world/fsharp/README.md +++ b/docs/providers/aws/examples/hello-world/fsharp/README.md @@ -37,7 +37,7 @@ Using the `create` command we can specify one of the available [templates](https The `--path` or shorthand `-p` is the location to be created with the template service files. Change directories into this new folder. -## 2. Build using .NET Core 2.X CLI tools and create zip package +## 2. Build using .NET Core 3.1.x CLI tools and create zip package ``` # Linux or Mac OS diff --git a/lib/plugins/create/templates/aws-fsharp/Handler.fs b/lib/plugins/create/templates/aws-fsharp/Handler.fs index e1eb3a208..e255203da 100644 --- a/lib/plugins/create/templates/aws-fsharp/Handler.fs +++ b/lib/plugins/create/templates/aws-fsharp/Handler.fs @@ -1,7 +1,7 @@ namespace AwsDotnetFsharp open Amazon.Lambda.Core -[)>] +[)>] do () type Request = { Key1 : string; Key2 : string; Key3 : string } diff --git a/lib/plugins/create/templates/aws-fsharp/aws-fsharp.fsproj b/lib/plugins/create/templates/aws-fsharp/aws-fsharp.fsproj index c7ff528a6..921a92262 100644 --- a/lib/plugins/create/templates/aws-fsharp/aws-fsharp.fsproj +++ b/lib/plugins/create/templates/aws-fsharp/aws-fsharp.fsproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp3.1 FsharpHandlers aws-fsharp @@ -11,12 +11,8 @@ - - - - - - + + diff --git a/lib/plugins/create/templates/aws-fsharp/build.cmd b/lib/plugins/create/templates/aws-fsharp/build.cmd index e59f004ed..7b1550086 100644 --- a/lib/plugins/create/templates/aws-fsharp/build.cmd +++ b/lib/plugins/create/templates/aws-fsharp/build.cmd @@ -1,2 +1,4 @@ dotnet restore -dotnet lambda package --configuration release --framework netcoreapp2.1 --output-package bin/release/netcoreapp2.1/deploy-package.zip +dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp3.1 + +dotnet lambda package --configuration Release --framework netcoreapp3.1 --output-package bin/Release/netcoreapp3.1/deploy-package.zip \ No newline at end of file diff --git a/lib/plugins/create/templates/aws-fsharp/build.sh b/lib/plugins/create/templates/aws-fsharp/build.sh index ceb9a8e0e..cfd8e9bf9 100644 --- a/lib/plugins/create/templates/aws-fsharp/build.sh +++ b/lib/plugins/create/templates/aws-fsharp/build.sh @@ -8,4 +8,5 @@ then fi dotnet restore -dotnet lambda package --configuration release --framework netcoreapp2.1 --output-package bin/release/netcoreapp2.1/deploy-package.zip +dotnet tool install -g Amazon.Lambda.Tools --framework netcoreapp3.1 +dotnet lambda package --configuration Release --framework netcoreapp3.1 --output-package bin/Release/netcoreapp3.1/deploy-package.zip \ No newline at end of file diff --git a/lib/plugins/create/templates/aws-fsharp/serverless.yml b/lib/plugins/create/templates/aws-fsharp/serverless.yml index f854baad1..f5cf6292d 100644 --- a/lib/plugins/create/templates/aws-fsharp/serverless.yml +++ b/lib/plugins/create/templates/aws-fsharp/serverless.yml @@ -22,7 +22,7 @@ service: aws-fsharp # NOTE: update this with your service name provider: name: aws - runtime: dotnetcore2.1 + runtime: dotnetcore3.1 # you can overwrite defaults here # stage: dev @@ -50,7 +50,7 @@ provider: # you can add packaging information here package: - artifact: bin/release/netcoreapp2.1/deploy-package.zip + artifact: bin/Release/netcoreapp3.1/deploy-package.zip # exclude: # - exclude-me.js # - exclude-me-dir/**