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.

31 lines
1.4 KiB

  1. $scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
  2. Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow
  3. $pubFolderToDelete = $scriptPath + "\pub"
  4. remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue
  5. #cmd /c "rd /s pub" /q
  6. $webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json"
  7. Write-Host "webPathToJson is $webPathToJson" -ForegroundColor Yellow
  8. $webPathToPub = $scriptPath + "\pub\webMVC"
  9. Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow
  10. dotnet publish $webPathToJson -o $webPathToPub
  11. $catalogPathToJson = $scriptPath + "\src\Services\Catalog\Catalog.API\project.json"
  12. Write-Host "catalogPathToJson is $catalogPathToJson" -ForegroundColor Yellow
  13. $catalogPathToPub = $scriptPath + "\pub\catalog"
  14. Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow
  15. dotnet publish $catalogPathToJson -o $catalogPathToPub
  16. $orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json"
  17. Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow
  18. $orderingPathToPub = $scriptPath + "\pub\ordering"
  19. Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow
  20. dotnet publish $orderingPathToJson -o $orderingPathToPub
  21. docker build -t eshop/web $webPathToPub
  22. docker build -t eshop/catalog.api $catalogPathToPub
  23. docker build -t eshop/ordering.api $orderingPathToPub