From d61f20dd67d3ebf0b0c16a82896a88a4ac46d1df Mon Sep 17 00:00:00 2001 From: duncan Date: Thu, 13 Aug 2020 13:15:47 +0100 Subject: [PATCH 1/3] buildall.sh restore original paths using pushd/pops --- buildAll.sh | 60 +++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/buildAll.sh b/buildAll.sh index 3d586ad6..23906996 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -1,39 +1,41 @@ dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) echo "Start building Electron.NET dev stack..." + echo "Restore & Build API" -cd $dir/ElectronNET.API -dotnet restore -dotnet build -cd .. +pushd $dir/ElectronNET.API + dotnet restore + dotnet build +popd echo "Restore & Build CLI" -cd $dir/ElectronNET.CLI -dotnet restore -dotnet build -cd .. +pushd $dir/ElectronNET.CLI + dotnet restore + dotnet build +podp echo "Restore & Build WebApp Demo" -cd $dir/ElectronNET.WebApp -dotnet restore -dotnet build - -echo "Install CLI as dotnet tool" - -dotnet tool uninstall ElectronNET.CLI -g -dotnet tool install ElectronNET.CLI -g - -echo "Invoke electronize build in WebApp Demo" -echo "/target win (dev-build)" -electronize build /target win - -echo "/target linux (dev-build)" -electronize build /target linux - -echo "/target osx (dev-build)" -electronize build /target osx - -echo "/target custom win7-x86;win (dev-build)" -electronize build /target custom "win7-x86;win" +pushd $dir/ElectronNET.WebApp + dotnet restore + dotnet build + + echo "Install CLI as dotnet tool" + + dotnet tool uninstall ElectronNET.CLI -g + dotnet tool install ElectronNET.CLI -g + + echo "Invoke electronize build in WebApp Demo" + echo "/target win (dev-build)" + electronize build /target win + + echo "/target linux (dev-build)" + electronize build /target linux + + echo "/target osx (dev-build)" + electronize build /target osx + + echo "/target custom win7-x86;win (dev-build)" + electronize build /target custom "win7-x86;win" +popd # Be aware, that for non-electronnet-dev environments the correct # invoke command would be dotnet electronize ... From 15771461876f07cba8273e8810dd6c0ae339b10a Mon Sep 17 00:00:00 2001 From: duncan Date: Thu, 13 Aug 2020 13:18:49 +0100 Subject: [PATCH 2/3] buildall.sh disable win/osx builds on linux --- buildAll.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/buildAll.sh b/buildAll.sh index 23906996..51572900 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -30,11 +30,15 @@ pushd $dir/ElectronNET.WebApp echo "/target linux (dev-build)" electronize build /target linux - echo "/target osx (dev-build)" - electronize build /target osx - - echo "/target custom win7-x86;win (dev-build)" - electronize build /target custom "win7-x86;win" + # Cannot public osx/win on windows due to: + # NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. + if [[ "$OSTYPE" != "linux-gnu"* ]]; then + echo "/target osx (dev-build)" + electronize build /target osx + + echo "/target custom win7-x86;win (dev-build)" + electronize build /target custom "win7-x86;win" + fi popd # Be aware, that for non-electronnet-dev environments the correct From d2457203bcdc36b1ae4f13447935bad879afbab3 Mon Sep 17 00:00:00 2001 From: duncan Date: Fri, 14 Aug 2020 10:19:11 +0100 Subject: [PATCH 3/3] Add build electron host to buildAll.sh --- buildAll.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/buildAll.sh b/buildAll.sh index 51572900..a02959a1 100755 --- a/buildAll.sh +++ b/buildAll.sh @@ -1,6 +1,12 @@ dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) echo "Start building Electron.NET dev stack..." +echo "Build Electron Host" +pushd $dir//ElectronNET.Host + npm install + npm run-script start +popd + echo "Restore & Build API" pushd $dir/ElectronNET.API dotnet restore