From 5979116c4db6ff1159b6ae9c7d00b4d8a67f6ada Mon Sep 17 00:00:00 2001 From: Sander Saares Date: Tue, 28 Jan 2020 09:55:50 +0200 Subject: [PATCH] Package files in build script --- .gitignore | 2 ++ Build.ps1 | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 611428f..5d4e663 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +Output + ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## diff --git a/Build.ps1 b/Build.ps1 index d76ff60..31c7e8c 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -8,4 +8,13 @@ if ($LASTEXITCODE -ne 0) { dotnet publish -c Release -r win-x64 if ($LASTEXITCODE -ne 0) { Write-Error "Build failed for win-64" -} \ No newline at end of file +} + +if (!(Test-Path ./Output/)) { + New-Item -ItemType Directory ./Output/ | Out-Null +} + +Get-ChildItem ./Output/ | Remove-Item + +Compress-Archive -Path ./TzspPacketStreamExporter/bin/Release/netcoreapp3.1/linux-x64/publish/* -DestinationPath ./Output/linux-x64.zip +Compress-Archive -Path ./TzspPacketStreamExporter/bin/Release/netcoreapp3.1/win-x64/publish/* -DestinationPath ./Output/win-x64.zip \ No newline at end of file