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.

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