publish sers(net6.0).bat 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. set netVersion=net6.0
  2. :: 调用工具 替换csproj
  3. cd ..\..\..\..
  4. VsTool.exe replace -r --file "App.Gateway.csproj|App.Gover.Gateway.csproj|App.ServiceCenter.csproj|Did.SersLoader.Demo.csproj|App.Robot.Station.csproj" --old "<TargetFramework>netcoreapp2.1</TargetFramework>" --new "<TargetFramework>net6.0</TargetFramework>"
  5. cd Sers\dotnet\Doc\Publish
  6. echo publish sers
  7. echo dotnet version: %netVersion%
  8. :: 1 publish
  9. cd /d ../../
  10. echo 'publish Gateway'
  11. cd /d Gateway\App.Gateway
  12. dotnet build --configuration Release
  13. dotnet publish --configuration Release --output ..\..\Doc\Publish\SersPublish\%netVersion%\Gateway
  14. @if errorlevel 1 (echo . & echo . & echo 出错,请排查!& pause)
  15. cd /d ../../
  16. echo 'publish Gover'
  17. cd /d ServiceCenter\App.Gover.Gateway
  18. dotnet build --configuration Release
  19. dotnet publish --configuration Release --output ..\..\Doc\Publish\SersPublish\%netVersion%\Gover
  20. @if errorlevel 1 (echo . & echo . & echo 出错,请排查!& pause)
  21. cd /d ../../
  22. echo 'publish ServiceCenter'
  23. cd /d ServiceCenter\App.ServiceCenter
  24. dotnet build --configuration Release
  25. dotnet publish --configuration Release --output ..\..\Doc\Publish\SersPublish\%netVersion%\ServiceCenter
  26. @if errorlevel 1 (echo . & echo . & echo 出错,请排查!& pause)
  27. cd /d ../../
  28. echo 'publish Demo'
  29. cd /d ServiceStation\Demo\SersLoader\Did.SersLoader.Demo
  30. dotnet build --configuration Release
  31. dotnet publish --configuration Release --output ..\..\..\..\Doc\Publish\SersPublish\%netVersion%\Demo
  32. @if errorlevel 1 (echo . & echo . & echo 出错,请排查!& pause)
  33. cd /d ../../../../
  34. echo 'publish Robot'
  35. cd /d ServiceStation\Demo\StressTest\App.Robot.Station
  36. dotnet build --configuration Release
  37. dotnet publish --configuration Release --output ..\..\..\..\Doc\Publish\SersPublish\%netVersion%\Robot
  38. @if errorlevel 1 (echo . & echo . & echo 出错,请排查!& pause)
  39. cd /d ../../../../
  40. cd /d Doc\Publish
  41. :: 2 copy Sers Static
  42. ::(x.1)
  43. @echo "copy PublishFile"
  44. xcopy "..\PublishFile\SersPublish" "SersPublish\%netVersion%" /e /i /r /y
  45. ::(x.2)ServiceCenter
  46. @echo "copy ServiceCenter wwwroot"
  47. xcopy "..\..\ServiceCenter\App.Gover.Gateway\wwwroot" "SersPublish\%netVersion%\ServiceCenter\wwwroot" /e /i /r /y
  48. @echo "copy xml of ServiceCenter"
  49. xcopy "..\..\ServiceCenter\App.ServiceCenter\bin\Release\%netVersion%\*.xml" "SersPublish\%netVersion%\ServiceCenter" /i /r /y
  50. ::(x.3)Gover
  51. @echo "copy Gover wwwroot"
  52. xcopy "..\..\ServiceCenter\App.Gover.Gateway\wwwroot" "SersPublish\%netVersion%\Gover\wwwroot" /e /i /r /y
  53. ::(x.4)Robot
  54. @echo "copy Robot wwwroot"
  55. xcopy "..\..\ServiceStation\Demo\StressTest\App.Robot.Station\wwwroot" "SersPublish\%netVersion%\Robot\wwwroot" /e /i /r /y
  56. @echo "copy xml of Robot"
  57. xcopy "..\..\ServiceStation\Demo\StressTest\App.Robot.Station\bin\Release\%netVersion%\*.xml" "SersPublish\%netVersion%\Robot" /i /r /y
  58. ::(x.5)
  59. @echo "copy xml of Demo"
  60. xcopy "..\..\ServiceStation\Demo\SersLoader\Did.SersLoader.Demo\bin\Release\%netVersion%\*.xml" "SersPublish\%netVersion%\Demo" /i /r /y
  61. :: 调用工具 替换csproj
  62. cd ..\..\..\..
  63. VsTool.exe replace -r --file "App.Gateway.csproj|App.Gover.Gateway.csproj|App.ServiceCenter.csproj|Did.SersLoader.Demo.csproj|App.Robot.Station.csproj" --old "<TargetFramework>net6.0</TargetFramework>" --new "<TargetFramework>netcoreapp2.1</TargetFramework>"
  64. cd Sers\dotnet\Doc\Publish
  65. echo 'publish sers succeed!'
  66. echo 'publish sers succeed!'
  67. echo 'publish sers succeed!'