From 338d3cc8623d5f05c007a2fe2be50a6383e96a53 Mon Sep 17 00:00:00 2001 From: Alan Edwardes Date: Fri, 23 Apr 2021 21:22:03 +0100 Subject: [PATCH] Adds PublishLambda.ps1 --- PublishLambda.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 PublishLambda.ps1 diff --git a/PublishLambda.ps1 b/PublishLambda.ps1 new file mode 100644 index 0000000..214e2e3 --- /dev/null +++ b/PublishLambda.ps1 @@ -0,0 +1,10 @@ +$ErrorActionPreference = "Stop" + +$OutputFolder = "hosting/Estranged.Lfs.Hosting.Lambda/bin/Release/netcoreapp3.1/linux-x64/publish" +$OutputFile = "Estranged.Lfs.Hosting.Lambda.zip" +$InputProject = "hosting/Estranged.Lfs.Hosting.Lambda/Estranged.Lfs.Hosting.Lambda.csproj" + +Remove-Item -LiteralPath $OutputFile -ErrorAction Ignore +Remove-Item -LiteralPath $OutputFolder -Force -Recurse -ErrorAction Ignore +dotnet publish $InputProject --runtime linux-x64 --configuration Release +Compress-Archive -Path $OutputFolder/* -DestinationPath $OutputFile \ No newline at end of file