-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-ux.sh
executable file
·62 lines (47 loc) · 1.21 KB
/
build-ux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
# ------------------------- Variables ------------------------- #
donotzip=false
if [ $# -eq 1 ] && [ "$1" == "--no-zip" ];
then
donotzip=true
fi
# ------------------------- Functions ------------------------- #
zip_dir_contents () {
echo "Zipping $f"
(
cd $1
zip -r $2 ./*
)
}
# ------------------------- Main ------------------------- #
if [ -d "./build/ux" ]; then
rm -rf ./build/ux/*
fi
echo ""
echo "Building Touch-Gestures.UX.Desktop"
echo ""
# build the desktop on linux & windows
platforms=("linux-x64" "linux-arm64" "linux-arm" "win-x64" "win-x86" "win-arm64" "osx-x64" "osx-arm64")
for platform in "${platforms[@]}"
do
# build the desktop on linux & windows
dotnet publish Touch-Gestures.UX.Desktop -c Release -p:noWarn='"NETSDK1138;VSTHRD200"' -r $platform -o build/ux/$platform -p:OTDVersion=OTD05
done
find ./build/ux -name "*.pdb" -type f -delete
if [ $donotzip == true ];
then
echo "Skipping zipping of UX"
exit 0
fi
# zip all the files
(
cd ./build/ux
for f in *; do
if [ -d "$f" ]; then
zip_dir_contents $f "../Touch-Gestures.UX-$f.zip"
fi
done
)
echo ""
echo "UX built successfully"
echo ""