sers-publish(net6.0).bat 3.5 KB

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