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
|
#!/bin/bash
|
||||||
|
|
||||||
|
declare -x path=$1
|
||||||
|
|
||||||
|
if [ -z "$path" ]; then
|
||||||
|
$path="$(pwd)/../src";
|
||||||
|
fi
|
||||||
|
|
||||||
declare -a projectList=(
|
declare -a projectList=(
|
||||||
'../src/Services/Catalog/Catalog.API'
|
"$path/Web/WebSPA"
|
||||||
'../src/Services/Basket/Basket.API'
|
"$path/Services/Catalog/Catalog.API"
|
||||||
'../src/Services/Ordering/Ordering.API'
|
"$path/Services/Basket/Basket.API"
|
||||||
'../src/Services/Identity/Identity.API'
|
"$path/Services/Ordering/Ordering.API"
|
||||||
'../src/Web/WebMVC'
|
"$path/Services/Identity/Identity.API"
|
||||||
'../src/Web/WebSPA'
|
"$path/Services/Location/Locations.API"
|
||||||
'../src/Web/WebStatus'
|
"$path/Services/Marketing/Marketing.API"
|
||||||
|
"$path/Services/Payment/Payment.API"
|
||||||
|
"$path/Services/GracePeriod/GracePeriodManager"
|
||||||
|
"$path/Web/WebMVC"
|
||||||
|
"$path/Web/WebStatus"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build SPA app
|
# Build SPA app
|
||||||
@ -15,9 +26,9 @@ declare -a projectList=(
|
|||||||
|
|
||||||
for project in "${projectList[@]}"
|
for project in "${projectList[@]}"
|
||||||
do
|
do
|
||||||
echo -e "\e[33mWorking on $(pwd)/$project"
|
echo -e "\e[33mWorking on $path/$project"
|
||||||
echo -e "\e[33m\tRemoving old publish output"
|
echo -e "\e[33m\tRemoving old publish output"
|
||||||
pushd $(pwd)/$project
|
pushd $path/$project
|
||||||
rm -rf obj/Docker/publish
|
rm -rf obj/Docker/publish
|
||||||
echo -e "\e[33m\tRestoring project"
|
echo -e "\e[33m\tRestoring project"
|
||||||
dotnet restore
|
dotnet restore
|
||||||
@ -26,14 +37,15 @@ do
|
|||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
# remove old docker images:
|
## remove old docker images:
|
||||||
images=$(docker images --filter=reference="eshop/*" -q)
|
#images=$(docker images --filter=reference="eshop/*" -q)
|
||||||
if [ -n "$images" ]; then
|
#if [ -n "$images" ]; then
|
||||||
docker rm $(docker ps -a -q) -f
|
# docker rm $(docker ps -a -q) -f
|
||||||
echo "Deleting eShop images in local Docker repo"
|
# echo "Deleting eShop images in local Docker repo"
|
||||||
echo $images
|
# echo $images
|
||||||
docker rmi $(docker images --filter=reference="eshop/*" -q) -f
|
# docker rmi $(docker images --filter=reference="eshop/*" -q) -f
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
|
|
||||||
# No need to build the images, docker build or docker compose will
|
# 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.
|
# 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
|
image: microsoft/aspnetcore-build:1.1.2
|
||||||
volumes:
|
volumes:
|
||||||
- .:/src
|
- .:/src
|
||||||
|
- ./cli-linux:/cli-linux
|
||||||
working_dir: /src
|
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