From 75efb45e6bdc67dfe97b1d0b022d8e72d2e9191f Mon Sep 17 00:00:00 2001 From: c272 Date: Wed, 10 Aug 2022 16:40:30 +0100 Subject: [PATCH] Add utility script to build release zips. --- build-release.sh | 24 ++++++++++++++++++++++++ iro4cli.csproj | 1 + 2 files changed, 25 insertions(+) create mode 100755 build-release.sh diff --git a/build-release.sh b/build-release.sh new file mode 100755 index 0000000..56fb09d --- /dev/null +++ b/build-release.sh @@ -0,0 +1,24 @@ +# Builds iro4cli in Release mode, configured as a standalone application without need for the .NET runtime. +# Generates binaries for Linux, Windows and Mac. + +sudo rm -rf bin/ +CYAN='\033[0;36m' +GREEN='\033[0;32m' +NC='\033[0m' + +mkdir -p bin/ReleaseZipped + +function buildVariant { + echo -e "${CYAN}Building variant for $1...${NC}" + dotnet publish -r $1 -c Release --self-contained true --p:DebugSymbols=false --p:DebugType=None + zip -r bin/ReleaseZipped/$1.zip bin/Release/net6.0/$1/publish + echo -e "${GREEN}Build complete for $1.${NC}" +} + +buildVariant win-x64 +buildVariant linux-x64 +buildVariant linux-musl-x64 +buildVariant linux-arm64 +buildVariant osx-x64 + +echo -e "${GREEN}All builds completed. Exiting...${NC}" \ No newline at end of file diff --git a/iro4cli.csproj b/iro4cli.csproj index 879f10e..70f9bf6 100644 --- a/iro4cli.csproj +++ b/iro4cli.csproj @@ -6,6 +6,7 @@ false 7.1 false + true