sers压测-publish.bat 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @echo off
  2. ::启用变量延迟
  3. setlocal EnableDelayedExpansion
  4. ::(x.1)获取basePath
  5. set curPath=%cd%
  6. cd /d "%~dp0"
  7. cd /d ../..
  8. set basePath=%cd%
  9. set publishPath=%basePath%/Publish/release/release/CL压测
  10. echo ------------------------------------------------------------------
  11. :: 发布Sers压测CL
  12. echo 发布Sers压测CL
  13. ::publish Client
  14. cd /d "%basePath%\dotnet\Library\Sers\Sers.CL\Test\CommunicationManage\CmClient"
  15. dotnet build --configuration Release
  16. dotnet publish --configuration Release --output "%publishPath%\CmClient"
  17. @if errorlevel 1 (echo . & echo . & echo 出错,请排查!& pause)
  18. ::publish Server
  19. cd /d "%basePath%\dotnet\Library\Sers\Sers.CL\Test\CommunicationManage\CmServer"
  20. dotnet build --configuration Release
  21. dotnet publish --configuration Release --output "%publishPath%\CmServer"
  22. @if errorlevel 1 (echo . & echo . & echo 出错,请排查!& pause)
  23. ::copy bat
  24. xcopy "%basePath%\Publish\PublishFile\CL压测" "%publishPath%" /e /i /r /y
  25. echo ------------------------------------------------------------------
  26. :: 发布Sers压测
  27. for %%i in (netcoreapp2.1,net6.0) do (
  28. set netVersion=%%i
  29. set appPath=%basePath%/Publish/release/release/SersPublish/!netVersion!
  30. echo 发布Sers压测-!netVersion!
  31. ::单体压测
  32. set targetPath=%basePath%/Publish/release/release/Sers压测/sers压测-单体压测!netVersion!
  33. ::(x.x.1)copy ServiceCenter
  34. xcopy "!appPath!\ServiceCenter" "!targetPath!\ServiceCenter" /e /i /r /y
  35. ::(x.x.2)copy demo
  36. xcopy "!appPath!\Demo\wwwroot" "!targetPath!\ServiceCenter\wwwroot" /e /i /r /y
  37. xcopy "!appPath!\Demo\Did.SersLoader.Demo.dll" "!targetPath!\ServiceCenter" /i /r /y
  38. xcopy "!appPath!\Demo\Did.SersLoader.Demo.pdb" "!targetPath!\ServiceCenter" /i /r /y
  39. xcopy "!appPath!\Demo\Did.SersLoader.Demo.xml" "!targetPath!\ServiceCenter" /i /r /y
  40. ::(x.x.3)copy Robot
  41. xcopy "!appPath!\Robot\wwwroot" "!targetPath!\ServiceCenter\wwwroot" /e /i /r /y
  42. xcopy "!appPath!\Robot\App.Robot.Station.dll" "!targetPath!\ServiceCenter" /i /r /y
  43. xcopy "!appPath!\Robot\App.Robot.Station.pdb" "!targetPath!\ServiceCenter" /i /r /y
  44. xcopy "!appPath!\Robot\App.Robot.Station.xml" "!targetPath!\ServiceCenter" /i /r /y
  45. ::(x.x.4)copy bat
  46. xcopy "%basePath%\Publish\PublishFile\Sers压测\单体压测" "!targetPath!" /e /i /r /y
  47. ::分布式压测
  48. set targetPath=%basePath%/Publish/release/release/Sers压测/sers压测-分布式压测!netVersion!
  49. ::(x.x.1)copy station
  50. xcopy "!appPath!\ServiceCenter" "!targetPath!\ServiceCenter" /e /i /r /y
  51. xcopy "!appPath!\Demo" "!targetPath!\Demo" /e /i /r /y
  52. xcopy "!appPath!\Robot" "!targetPath!\Robot" /e /i /r /y
  53. ::(x.x.2)copy bat
  54. xcopy "%basePath%\Publish\PublishFile\Sers压测\分布式压测" "!targetPath!" /e /i /r /y
  55. )
  56. echo %~n0.bat 执行成功!
  57. cd /d "%curPath%"