1
+ # flag arguments to target specific builds are available.
2
+
3
+ # sh ./buildAll.sh
4
+ # sh ./buildAll.sh -t osx
5
+ # sh ./buildAll.sh -t win
6
+ # sh ./buildAll.sh -t linux
7
+
8
+ target=default
9
+ while getopts t: flag; do
10
+ case " ${flag} " in
11
+ t) target=${OPTARG} ;;
12
+ esac
13
+ done
14
+
1
15
dir=$( cd -P -- " $( dirname -- " $0 " ) " && pwd -P)
2
16
echo " Start building Electron.NET dev stack..."
3
17
@@ -23,29 +37,35 @@ echo "Restore & Build WebApp Demo"
23
37
pushd $dir /ElectronNET.WebApp
24
38
dotnet restore
25
39
dotnet build
26
-
40
+
27
41
echo " Install CLI as dotnet tool"
28
-
42
+
29
43
dotnet tool uninstall ElectronNET.CLI -g
30
44
dotnet tool install ElectronNET.CLI -g
31
-
45
+
32
46
echo " Invoke electronize build in WebApp Demo"
33
- echo " /target win (dev-build)"
34
- electronize build /target win
35
-
36
- echo " /target linux (dev-build)"
37
- electronize build /target linux
38
-
39
- # Cannot public osx/win on windows due to:
40
- # NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture.
41
- if [[ " $OSTYPE " != " linux-gnu" * ]]; then
42
- echo " /target osx (dev-build)"
43
- electronize build /target osx
44
-
45
- echo " /target custom win7-x86;win (dev-build)"
46
- electronize build /target custom " win7-x86;win"
47
+
48
+ if [[ " $target " != " default" ]]; then
49
+ echo " /target $target (dev-build)"
50
+ electronize build /target $target
51
+ else
52
+ echo " /target win (dev-build)"
53
+ electronize build /target win
54
+
55
+ echo " /target linux (dev-build)"
56
+ electronize build /target linux
57
+
58
+ # Cannot publish osx/win on windows due to:
59
+ # NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture.
60
+ if [[ " $OSTYPE " != " linux-gnu" * ]]; then
61
+ echo " /target osx (dev-build)"
62
+ electronize build /target osx
63
+
64
+ echo " /target custom win7-x86;win (dev-build)"
65
+ electronize build /target custom " win7-x86;win"
66
+ fi
47
67
fi
48
68
popd
49
69
50
- # Be aware, that for non-electronnet-dev environments the correct
70
+ # Be aware, that for non-electronnet-dev environments the correct
51
71
# invoke command would be dotnet electronize ...
0 commit comments