AutoGrid and build.sh
This commit is contained in:
28
build.sh
Normal file
28
build.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
outdir="bin"
|
||||
project="SharpCalculator.Avalonia"
|
||||
|
||||
# Somebody broke dotnet10 sdk .target files
|
||||
# To publish self-contained trimmed binary you should add <PublishTrimmed>true</PublishTrimmed> to project file.
|
||||
# Command-line option -p:PublishTrimmed=true produces an error.
|
||||
# Same with <PublishAot>true</PublishAot> if you want AOT compilation.
|
||||
args="
|
||||
--self-contained
|
||||
--use-current-runtime
|
||||
-p:PublishSingleFile=true
|
||||
-p:TrimMode=partial
|
||||
-p:EnableCompressionInSingleFile=true
|
||||
-p:OptimizationPreference=Size
|
||||
-p:InvariantGlobalization=true
|
||||
-p:DebugType=none
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true"
|
||||
|
||||
rm -rf "$outdir"
|
||||
command="dotnet publish $project -c Release -o $outdir $args"
|
||||
echo "$command"
|
||||
$command
|
||||
|
||||
find "$outdir" -name '*.pdb' -delete -printf "deleted '%p'\n"
|
||||
tree -sh "$outdir"
|
||||
Reference in New Issue
Block a user