forked from dotnet-architecture/eShopOnContainers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-bits.sh
More file actions
36 lines (32 loc) · 1.05 KB
/
Copy pathbuild-bits.sh
File metadata and controls
36 lines (32 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/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"
)
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\tRestoring project"
dotnet restore
echo -e "\e[33m\tBuilding and publishing projects"
dotnet publish -o obj/Docker/publish
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.