Add app build script for Linux

This commit is contained in:
chylex 2021-11-26 13:48:29 +01:00
parent 15db0cca8e
commit 5888d13d7c
No known key found for this signature in database
GPG Key ID: 4DE42C8F19A80548
2 changed files with 31 additions and 0 deletions

25
app/build.sh Executable file
View File

@ -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"

6
app/global.json Normal file
View File

@ -0,0 +1,6 @@
{
"sdk": {
"version": "5.0.0",
"rollForward": "latestMinor"
}
}