feat(Templates): Update aws-fsharp to netcoreapp3.1 (#7709)

This commit is contained in:
Stuart Lang 2020-05-11 11:29:31 +01:00 committed by GitHub
parent 46df82ea92
commit a5a136f982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 14 deletions

View File

@ -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:

View File

@ -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

View File

@ -1,7 +1,7 @@
namespace AwsDotnetFsharp
open Amazon.Lambda.Core
[<assembly:LambdaSerializer(typeof<Amazon.Lambda.Serialization.Json.JsonSerializer>)>]
[<assembly:LambdaSerializer(typeof<Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer>)>]
do ()
type Request = { Key1 : string; Key2 : string; Key3 : string }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>FsharpHandlers</AssemblyName>
<PackageId>aws-fsharp</PackageId>
</PropertyGroup>
@ -11,12 +11,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.3.0" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="2.2.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="2.0.1" />
</ItemGroup>
</Project>

View File

@ -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

View File

@ -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

View File

@ -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/**