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.

51 lines
1.4 KiB

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