Skip to content

Commit

Permalink
Update libraries and match csharp changes
Browse files Browse the repository at this point in the history
  • Loading branch information
slang25 committed Jun 24, 2017
1 parent 84a0e4f commit cfc39e1
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
12 changes: 4 additions & 8 deletions docs/providers/aws/examples/hello-world/fsharp/aws-fsharp.fsproj
Expand Up @@ -2,27 +2,23 @@

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>FsharpHandlers</AssemblyName>
<OutputType>Library</OutputType>
<PackageId>aws-fsharp</PackageId>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
</PropertyGroup>

<ItemGroup>
<Compile Include="Handler.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.0.1" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.1.0" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="1.4.0" />
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="1.6.0" />
</ItemGroup>

</Project>
6 changes: 2 additions & 4 deletions lib/plugins/create/create.test.js
Expand Up @@ -122,8 +122,6 @@ describe('Create', () => {
});

it('should generate scaffolding for "aws-fsharp" template', () => {
const cwd = process.cwd();
fse.mkdirsSync(tmpDir);
process.chdir(tmpDir);
create.options.template = 'aws-fsharp';

Expand All @@ -140,8 +138,8 @@ describe('Create', () => {
.to.be.equal(true);
expect(create.serverless.utils.fileExistsSync(path.join(tmpDir, 'aws-fsharp.fsproj')))
.to.be.equal(true);

process.chdir(cwd);
expect(create.serverless.utils.fileExistsSync(path.join(tmpDir, 'global.json')))
.to.be.equal(true);
});
});

Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/create/templates/aws-fsharp/Handler.fs
Expand Up @@ -12,6 +12,6 @@ module Handler =
open System.IO
open System.Text

let hello(request:Request) =
let hello(request:Request) =
{ Message="Go Serverless v1.0! Your function executed successfully!"
Request=request }
Request=request }
12 changes: 4 additions & 8 deletions lib/plugins/create/templates/aws-fsharp/aws-fsharp.fsproj
Expand Up @@ -2,27 +2,23 @@

<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<DebugType>portable</DebugType>
<AssemblyName>FsharpHandlers</AssemblyName>
<OutputType>Library</OutputType>
<PackageId>aws-fsharp</PackageId>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
</PropertyGroup>

<ItemGroup>
<Compile Include="Handler.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.0.1" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.1.0" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.*" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="1.4.0" />
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="1.6.0" />
</ItemGroup>

</Project>
7 changes: 6 additions & 1 deletion lib/plugins/create/templates/aws-fsharp/build.sh
@@ -1,5 +1,10 @@
#!/bin/bash

#build handlers
#install zip
apt-get -qq update
apt-get -qq -y install zip

dotnet restore

#create deployment package
dotnet lambda package --configuration release --framework netcoreapp1.0 --output-package bin/release/netcoreapp1.0/deploy-package.zip
5 changes: 5 additions & 0 deletions lib/plugins/create/templates/aws-fsharp/global.json
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "1.0.4"
}
}
2 changes: 1 addition & 1 deletion tests/templates/test_all_templates
Expand Up @@ -9,7 +9,7 @@ function integration-test {
}

integration-test aws-csharp 'apt-get -qq update && apt-get -qq -y install zip && dotnet restore && dotnet lambda package --configuration release --framework netcoreapp1.0 --output-package bin/release/netcoreapp1.0/deploy-package.zip'
integration-test aws-fsharp 'dotnet restore && dotnet lambda package --configuration release --framework netcoreapp1.0 --output-package bin/release/netcoreapp1.0/deploy-package.zip'
integration-test aws-fsharp 'apt-get -qq update && apt-get -qq -y install zip && dotnet restore && dotnet lambda package --configuration release --framework netcoreapp1.0 --output-package bin/release/netcoreapp1.0/deploy-package.zip'
integration-test aws-groovy-gradle ./gradlew build
integration-test aws-java-gradle ./gradlew build
integration-test aws-java-maven mvn package
Expand Down

0 comments on commit cfc39e1

Please sign in to comment.