eShopOnContainers/cli-mac/build-bits.sh
Igor Sychev 2a64cd57de dotnet restore not needed in cli 2.0
"Starting with .NET Core 2.0 SDK, dotnet restore runs implicitily when you run dotnet build." (C) https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build?tabs=netcore2x
2017-09-07 08:00:11 +03:00

41 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
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"
)
pushd $(pwd)/../src/Web/WebSPA
npm install
npm rebuild node-sass
popd
for project in "${projectList[@]}"
do
echo -e "\e[33mWorking on $(pwd)/$project"
echo -e "\e[33m\tRemoving old publish output"
pushd $(pwd)/$project
rm -rf obj/Docker/publish
echo -e "\e[33m\tBuilding and publishing projects"
dotnet publish -o obj/Docker/publish -c Release
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
# 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.