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.

52 lines
1.4 KiB

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