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.

42 lines
1.1 KiB

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