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+
115dir=$( cd -P -- " $( dirname -- " $0 " ) " && pwd -P)
216echo " Start building Electron.NET dev stack..."
317
@@ -23,29 +37,35 @@ echo "Restore & Build WebApp Demo"
2337pushd $dir /ElectronNET.WebApp
2438 dotnet restore
2539 dotnet build
26-
40+
2741 echo " Install CLI as dotnet tool"
28-
42+
2943 dotnet tool uninstall ElectronNET.CLI -g
3044 dotnet tool install ElectronNET.CLI -g
31-
45+
3246 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
4767 fi
4868popd
4969
50- # Be aware, that for non-electronnet-dev environments the correct
70+ # Be aware, that for non-electronnet-dev environments the correct
5171# invoke command would be dotnet electronize ...
0 commit comments