diff --git a/app/build.sh b/app/build.sh new file mode 100755 index 0000000..12cfa28 --- /dev/null +++ b/app/build.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +if [ ! -f "DiscordHistoryTracker.sln" ]; then + echo "Missing DiscordHistoryTracker.sln in working directory!" + exit 1 +fi + +makezip() { + pushd "./bin/$1" + zip -9 -r "../$1.zip" . + popd +} + +rm -rf "./bin" + +configurations=(win-x64 linux-x64 osx-x64) + +for cfg in ${configurations[@]}; do + dotnet publish Desktop -c Release -r "$cfg" -o "./bin/$cfg" -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=false -p:PublishTrimmed=true --self-contained true + makezip "$cfg" +done + +dotnet publish Desktop -c Release -o "./bin/portable" --self-contained false +makezip "portable" diff --git a/app/global.json b/app/global.json new file mode 100644 index 0000000..a48ad76 --- /dev/null +++ b/app/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "5.0.0", + "rollForward": "latestMinor" + } +}