Publish.ps1 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. if($serviceName -eq "WingCloudServer")
  14. {
  15. dotnet publish "$servicePath/$serviceName.csproj" -c Debug -o $copyDest
  16. }
  17. else {
  18. dotnet publish "$servicePath/$serviceName.csproj" -c Debug
  19. }
  20. if($copyDll -eq 1)
  21. {
  22. Copy-Item -recurse -Force $servicePath/bin/Debug/net6.0/publish/$serviceName.dll -Destination $copyDest/$serviceName.dll
  23. }
  24. if($copyXml -eq 1)
  25. {
  26. Copy-Item -recurse -Force $servicePath/bin/Debug/netstandard2.0/publish/$serviceName.xml -Destination $copyDest/$serviceName.xml
  27. }
  28. }
  29. ### server
  30. BuildService "WingCloudServer" 0
  31. BuildService "WingServerCommon" 1 0 "../WingServerCommon"
  32. BuildService "WingInterfaceLibrary" 0 1
  33. BuildService "WingNotificationModule" 1 0 "../WingNotificationModule"
  34. BuildService "WingMongoDBModule" 1
  35. BuildService "WingStorageModule" 1
  36. BuildService "WingSMSModule" 1
  37. BuildService "WingSessionModule" 1
  38. BuildService "WingEmailModule" 1
  39. BuildService "WingUserModule" 1
  40. BuildService "WingManagementModule" 1
  41. BuildService "WingDeviceService" 1 0 "../WingDeviceService"
  42. BuildService "ReportService" 1 0 "../WingReportService/ReportService"
  43. BuildService "WingRemedicalModule" 1
  44. BuildService "WingAIDiagnosisService" 1 0 "../WingAIDiagnosisService"
  45. Copy-Item -recurse -Force ../WingAIDiagnosisService/bin/Debug/net6.0/publish/AIDiagnosis ../WingCloudServer/src/bin/Debug/net6.0
  46. Copy-Item -recurse -Force ../WingAIDiagnosisService/bin/Debug/net6.0/publish/Emgu.CV ../WingCloudServer/src/bin/Debug/net6.0
  47. BuildService "WingLiveConsultationService" 1 0 "../WingLiveConsultationService"
  48. BuildService "WingRtcService" 1 0 "../WingRtcService/WingRtcService"
  49. BuildService "WingASRService" 1 0 "../WingASRService"
  50. BuildService "WingEducationService" 1 0 "../WingEducationService"
  51. BuildService "WingPaymentService" 1 0 "../WingPaymentService"
  52. BuildService "WingDeployPlatformService" 1 0 "../WingCloudServer/src/WingDeployPlatformService"
  53. BuildService "WingLabService" 1 0 "../WingLabService"
  54. Write-Host 'Finished!' -NoNewline
  55. $null = [Console]::ReadKey('?')