From 80daa3293d321d5852e6b3dab4cdfb4a8f17e3ec Mon Sep 17 00:00:00 2001 From: Maciej Winnicki Date: Thu, 8 Dec 2016 17:57:57 +0100 Subject: [PATCH] remove build script for csharp example --- .../aws/examples/hello-world/csharp/README.md | 11 ++++++++++- .../aws/examples/hello-world/csharp/build.sh | 14 -------------- tests/templates/integration-test-template | 3 ++- tests/templates/test_all_templates | 2 +- 4 files changed, 13 insertions(+), 17 deletions(-) delete mode 100644 docs/providers/aws/examples/hello-world/csharp/build.sh diff --git a/docs/providers/aws/examples/hello-world/csharp/README.md b/docs/providers/aws/examples/hello-world/csharp/README.md index 4fe94ec4e..d494b0b1d 100644 --- a/docs/providers/aws/examples/hello-world/csharp/README.md +++ b/docs/providers/aws/examples/hello-world/csharp/README.md @@ -16,7 +16,16 @@ Make sure `serverless` is installed. [See installation guide](../../../guide/ins ## 1. Create a service `serverless create --template aws-csharp --path myService` or `sls create --template aws-csharp --path myService`, where 'myService' is a new folder to be created with template service files. Change directories into this new folder. -## 2. build +## 2. Build using .NET CLI tools and create zip package + +``` +dotnet restore +dotnet publish -c release + +pushd bin/Release/netcoreapp1.0/publish +zip -r ./deploy-package.zip ./* +popd +``` `./build.sh` runs the dotnet restore and package commands then creates the zip file to upload to lambda. diff --git a/docs/providers/aws/examples/hello-world/csharp/build.sh b/docs/providers/aws/examples/hello-world/csharp/build.sh deleted file mode 100644 index c97689e0b..000000000 --- a/docs/providers/aws/examples/hello-world/csharp/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -#build handlers -dotnet restore -dotnet publish -c release - -#install zip -apt-get -qq update -apt-get -qq -y install zip - -#create deployment package -pushd bin/Release/netcoreapp1.0/publish -zip -r ./deploy-package.zip ./* -popd diff --git a/tests/templates/integration-test-template b/tests/templates/integration-test-template index 31a13cede..468532a57 100755 --- a/tests/templates/integration-test-template +++ b/tests/templates/integration-test-template @@ -25,7 +25,8 @@ docker-compose build $template if [ ! -z "$2" ] then echo "Running Build command for $template" - docker-compose run -w /app $template ${@:2} + command=${@:2} + docker-compose run -w /app $template /bin/bash -c "$command" else echo "No Language build commands specified, skipping building" fi diff --git a/tests/templates/test_all_templates b/tests/templates/test_all_templates index 10fd10552..473d5b981 100755 --- a/tests/templates/test_all_templates +++ b/tests/templates/test_all_templates @@ -8,7 +8,7 @@ function integration-test { $DIR/integration-test-template $@ } -integration-test aws-csharp ./build.sh +integration-test aws-csharp 'apt-get -qq update && apt-get -qq -y install zip && dotnet restore && dotnet publish -c release && pushd bin/Release/netcoreapp1.0/publish && zip -r ./deploy-package.zip ./* && popd' integration-test aws-java-gradle ./gradlew build integration-test aws-java-maven mvn package integration-test aws-scala-sbt sbt assembly