From b41e1e677c749f881a93f427c1a90993dafc57cc Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 14 Nov 2021 13:14:18 -0600 Subject: [PATCH] Add improved build script and modify zip script to exclude parent directories --- .gitignore | 1 + build.sh | 5 +++++ zip-files.sh | 11 ++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 build.sh diff --git a/.gitignore b/.gitignore index a6e39df..653ded4 100644 --- a/.gitignore +++ b/.gitignore @@ -354,3 +354,4 @@ MigrationBackup/ # Exclude built binaries UsmToolkit/bin +builds/ diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..0d5c7aa --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +dotnet publish -r linux-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -o ./builds/linux-x64 +dotnet publish -r win-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -o ./builds/win-x64 +dotnet publish -r osx-x64 -c Release -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true -o ./builds/osx-x64 diff --git a/zip-files.sh b/zip-files.sh index 0e61d9a..b07125f 100755 --- a/zip-files.sh +++ b/zip-files.sh @@ -1,6 +1,15 @@ -FOLDERS=UsmToolkit/bin/Release/netcoreapp3.1/*/ +#!/bin/bash +cd builds +FOLDERS=*/ for f in $FOLDERS do zip -r "${f%/*}.zip" $f done + +echo "Cleaning up original directories..." +for f in $FOLDERS +do + rm -R $f +done +echo "Cleaned up. Exiting..."