Buildfiles to mitigate msbuild issue - https://github.com/Microsoft/msbuild/issues/2153
This commit is contained in:
parent
75065026fc
commit
cd42c17cd1
@ -1,12 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -x path=$1
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
$path="$(pwd)/../src";
|
||||
fi
|
||||
|
||||
declare -a projectList=(
|
||||
'../src/Services/Catalog/Catalog.API'
|
||||
'../src/Services/Basket/Basket.API'
|
||||
'../src/Services/Ordering/Ordering.API'
|
||||
'../src/Services/Identity/Identity.API'
|
||||
'../src/Web/WebMVC'
|
||||
'../src/Web/WebSPA'
|
||||
'../src/Web/WebStatus'
|
||||
"$path/Web/WebSPA"
|
||||
"$path/Services/Catalog/Catalog.API"
|
||||
"$path/Services/Basket/Basket.API"
|
||||
"$path/Services/Ordering/Ordering.API"
|
||||
"$path/Services/Identity/Identity.API"
|
||||
"$path/Services/Location/Locations.API"
|
||||
"$path/Services/Marketing/Marketing.API"
|
||||
"$path/Services/Payment/Payment.API"
|
||||
"$path/Services/GracePeriod/GracePeriodManager"
|
||||
"$path/Web/WebMVC"
|
||||
"$path/Web/WebStatus"
|
||||
)
|
||||
|
||||
# Build SPA app
|
||||
@ -15,9 +26,9 @@ declare -a projectList=(
|
||||
|
||||
for project in "${projectList[@]}"
|
||||
do
|
||||
echo -e "\e[33mWorking on $(pwd)/$project"
|
||||
echo -e "\e[33mWorking on $path/$project"
|
||||
echo -e "\e[33m\tRemoving old publish output"
|
||||
pushd $(pwd)/$project
|
||||
pushd $path/$project
|
||||
rm -rf obj/Docker/publish
|
||||
echo -e "\e[33m\tRestoring project"
|
||||
dotnet restore
|
||||
@ -26,14 +37,15 @@ do
|
||||
popd
|
||||
done
|
||||
|
||||
# remove old docker images:
|
||||
images=$(docker images --filter=reference="eshop/*" -q)
|
||||
if [ -n "$images" ]; then
|
||||
docker rm $(docker ps -a -q) -f
|
||||
echo "Deleting eShop images in local Docker repo"
|
||||
echo $images
|
||||
docker rmi $(docker images --filter=reference="eshop/*" -q) -f
|
||||
fi
|
||||
## remove old docker images:
|
||||
#images=$(docker images --filter=reference="eshop/*" -q)
|
||||
#if [ -n "$images" ]; then
|
||||
# docker rm $(docker ps -a -q) -f
|
||||
# echo "Deleting eShop images in local Docker repo"
|
||||
# echo $images
|
||||
# docker rmi $(docker images --filter=reference="eshop/*" -q) -f
|
||||
#fi
|
||||
|
||||
|
||||
# No need to build the images, docker build or docker compose will
|
||||
# do that using the images and containers defined in the docker-compose.yml file.
|
||||
|
@ -5,6 +5,10 @@ services:
|
||||
image: microsoft/aspnetcore-build:1.1.2
|
||||
volumes:
|
||||
- .:/src
|
||||
- ./cli-linux:/cli-linux
|
||||
working_dir: /src
|
||||
command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish"
|
||||
# DO NOT USE the sln file to compile because msbuild issue (https://github.com/Microsoft/msbuild/issues/2153)
|
||||
# command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish"
|
||||
# NOTE: Using build-bits-linux.sh triggers the same MSBUILD error :( (but at least, less frequently)
|
||||
command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && pushd /cli-linux && ./build-bits-linux.sh /src"
|
||||
|
Loading…
x
Reference in New Issue
Block a user