Publish.ps1 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. dotnet nuget locals all --clear
  2. Function BuildService($serviceName, $copyDll, $copyXml=0, $servicePath='', $copyDest='')
  3. {
  4. if($servicePath -eq '')
  5. {
  6. $servicePath = "../../$serviceName/src"
  7. }
  8. if($copyDest -eq '')
  9. {
  10. $copyDest = "../../WingCloudServer/src/bin/Debug/net6.0"
  11. }
  12. nuget restore "$servicePath/$serviceName.csproj" -source "http://nuget.ius.plus:88/v3/index.json;https://nuget.cdn.azure.cn/v3/index.json"
  13. dotnet publish "$servicePath/$serviceName.csproj" -c Debug
  14. if($copyDll -eq 1)
  15. {
  16. Copy-Item -recurse -Force $servicePath/bin/Debug/net6.0/publish/$serviceName.dll -Destination $copyDest/$serviceName.dll
  17. }
  18. if($copyXml -eq 1)
  19. {
  20. Copy-Item -recurse -Force $servicePath/bin/Debug/netstandard2.0/publish/$serviceName.xml -Destination $copyDest/$serviceName.xml
  21. }
  22. }
  23. ### server
  24. BuildService "WingCloudServer" 0
  25. BuildService "WingServerCommon" 1 0 "../../WingServerCommon"
  26. BuildService "WingInterfaceLibrary" 0 1
  27. BuildService "WingNotificationModule" 1 0 "../../WingNotificationModule"
  28. BuildService "WingMongoDBModule" 1
  29. BuildService "WingStorageModule" 1
  30. BuildService "WingSMSModule" 1
  31. BuildService "WingSessionModule" 1
  32. BuildService "WingEmailModule" 1
  33. IF (-not(Test-Path ../../wing/server/EmailTemplate/)) { New-Item -Path ../../WingCloudServer/src/bin/Debug/net6.0/ -Name EmailTemplate -Type Directory -force }
  34. Copy-Item ../../WingEmailModule/src/bin/Debug/net6.0/EmailTemplate/* -Destination ../../WingCloudServer/src/bin/Debug/net6.0/EmailTemplate
  35. BuildService "WingUserModule" 1
  36. BuildService "WingManagementModule" 1
  37. BuildService "WingDeviceService" 1 0 "../../WingDeviceService"
  38. BuildService "ReportService" 1 0 "../../WingReportService/ReportService"
  39. BuildService "WingRemedicalModule" 1
  40. BuildService "WingAIDiagnosisService" 1 0 "../../WingAIDiagnosisService"
  41. Write-Host 'Finished!' -NoNewline
  42. $null = [Console]::ReadKey('?')