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