Skip to content

Commit

Permalink
Add utility script to build release zips.
Browse files Browse the repository at this point in the history
  • Loading branch information
c272 committed Aug 10, 2022
1 parent 2de5197 commit 75efb45
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build-release.sh
Original file line number Diff line number Diff line change
@@ -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}"
1 change: 1 addition & 0 deletions iro4cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>7.1</LangVersion>
<Deterministic>false</Deterministic>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>
<ItemGroup>
<None Update=".travis.yml">
Expand Down

0 comments on commit 75efb45

Please sign in to comment.