41.StressTest-publish.bat 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @echo off
  2. ::enable delayed arguments
  3. setlocal EnableDelayedExpansion
  4. :: #1 get 获取basePath
  5. set curPath=%cd%
  6. cd /d "%~dp0"
  7. cd /d ../../..
  8. set basePath=%cd%
  9. :: #2
  10. set publishPath=%basePath%/Publish/release/release/StressTest
  11. echo ------------------------------------------------------------------
  12. echo "#3 publish CL stressTest"
  13. ::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%\CL压测net6.0\CmClient"
  17. @if errorlevel 1 (echo . & echo . & echo error & pause)
  18. ::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%\CL压测net6.0\CmServer"
  22. @if errorlevel 1 (echo . & echo . & echo error & pause)
  23. ::copy bat
  24. xcopy "%basePath%\Publish\ReleaseFile\StressTest\CL压测" "%publishPath%\CL压测net6.0" /e /i /r /y
  25. echo ------------------------------------------------------------------
  26. :: #4 publish Sers stressTest
  27. for %%i in (net6.0) do (
  28. set netVersion=%%i
  29. set appPath=%basePath%/Publish/release/release/Station^(!netVersion!^)
  30. echo 发布 压测-!netVersion!
  31. ::单体压测
  32. set targetPath=%publishPath%/单体压测!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 ReleaseFile
  46. xcopy "%basePath%\Publish\ReleaseFile\StressTest\单体压测" "!targetPath!" /e /i /r /y
  47. ::分布式压测
  48. set targetPath=%publishPath%/分布式压测!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 ReleaseFile
  54. xcopy "%basePath%\Publish\ReleaseFile\StressTest\分布式压测" "!targetPath!" /e /i /r /y
  55. )
  56. echo %~n0.bat success
  57. cd /d "%curPath%"