Inegrate calendi in meeting Schedule
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.

57 lines
1.8 KiB

  1. # COMMON PATHS
  2. $buildFolder = (Get-Item -Path "./" -Verbose).FullName
  3. $slnFolder = Join-Path $buildFolder "../"
  4. $outputFolder = Join-Path $buildFolder "outputs"
  5. $webHostFolder = Join-Path $slnFolder "src/MeetingSchedule.Web.Host"
  6. $ngFolder = Join-Path $buildFolder "../../angular"
  7. ## CLEAR ######################################################################
  8. Remove-Item $outputFolder -Force -Recurse -ErrorAction Ignore
  9. New-Item -Path $outputFolder -ItemType Directory
  10. ## RESTORE NUGET PACKAGES #####################################################
  11. Set-Location $slnFolder
  12. dotnet restore
  13. ## PUBLISH WEB HOST PROJECT ###################################################
  14. Set-Location $webHostFolder
  15. dotnet publish --output (Join-Path $outputFolder "Host")
  16. ## PUBLISH ANGULAR UI PROJECT #################################################
  17. Set-Location $ngFolder
  18. & yarn
  19. & ng build --prod
  20. Copy-Item (Join-Path $ngFolder "dist") (Join-Path $outputFolder "ng") -Recurse
  21. Copy-Item (Join-Path $ngFolder "Dockerfile") (Join-Path $outputFolder "ng")
  22. # Change UI configuration
  23. $ngConfigPath = Join-Path $outputFolder "ng/assets/appconfig.json"
  24. (Get-Content $ngConfigPath) -replace "44311", "9901" | Set-Content $ngConfigPath
  25. (Get-Content $ngConfigPath) -replace "4200", "9902" | Set-Content $ngConfigPath
  26. ## CREATE DOCKER IMAGES #######################################################
  27. # Host
  28. Set-Location (Join-Path $outputFolder "Host")
  29. docker rmi abp/host -f
  30. docker build -t abp/host .
  31. # Angular UI
  32. Set-Location (Join-Path $outputFolder "ng")
  33. docker rmi abp/ng -f
  34. docker build -t abp/ng .
  35. ## DOCKER COMPOSE FILES #######################################################
  36. Copy-Item (Join-Path $slnFolder "docker/ng/*.*") $outputFolder
  37. ## FINALIZE ###################################################################
  38. Set-Location $outputFolder