You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

  1. projectList=(
  2. "/src/Services/Catalog/Catalog.API"
  3. "/src/Services/Basket/Basket.API"
  4. "/src/Services/Ordering/Ordering.API"
  5. "/src/Services/Identity/Identity.API"
  6. "/src/Web/WebMVC"
  7. "/src/Web/WebSPA"
  8. "/src/Web/WebStatus
  9. )
  10. # Build SPA app
  11. pushd $(pwd)/src/Web/WebSPA
  12. npm rebuild node-sass
  13. npm run build:prod
  14. for project in "${projectList[@]}"
  15. do
  16. echo -e "\e[33mWorking on $(pwd)/$project"
  17. echo -e "\e[33m\tRemoving old publish output"
  18. pushd $(pwd)/$project
  19. rm -rf obj/Docker/publish
  20. echo -e "\e[33m\tRestoring project"
  21. dotnet restore
  22. echo -e "\e[33m\tBuilding and publishing projects"
  23. dotnet publish -o obj/Docker/publish
  24. popd
  25. done
  26. # remove old docker images:
  27. #images=$(docker images --filter=reference="eshop/*" -q)
  28. #if [ -n "$images" ]; then
  29. # docker rm $(docker ps -a -q) -f
  30. # echo "Deleting eShop images in local Docker repo"
  31. # echo $images
  32. # docker rmi $(docker images --filter=reference="eshop/*" -q) -f
  33. #fi
  34. # No need to build the images, docker build or docker compose will
  35. # do that using the images and containers defined in the docker-compose.yml file.