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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 bat"
  42. xcopy "..\PublishFile\SersPublish" "SersPublish\%netVersion%" /e /i /r /y
  43. ::(x.2)copy xml
  44. @echo "copy ServiceCenter xml "
  45. xcopy "..\..\ServiceCenter\App.ServiceCenter\bin\Release\%netVersion%\*.xml" "SersPublish\%netVersion%\ServiceCenter" /i /r /y
  46. @echo "copy Robot xml"
  47. xcopy "..\..\ServiceStation\Demo\StressTest\App.Robot.Station\bin\Release\%netVersion%\*.xml" "SersPublish\%netVersion%\Robot" /i /r /y
  48. @echo "copy Demo xml"
  49. xcopy "..\..\ServiceStation\Demo\SersLoader\Did.SersLoader.Demo\bin\Release\%netVersion%\*.xml" "SersPublish\%netVersion%\Demo" /i /r /y
  50. cd /d ..\cmd
  51. :: 调用工具 替换csproj
  52. 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>"
  53. cd Sers\dotnet\Doc\Publish
  54. echo 'publish sers succeed!'
  55. echo 'publish sers succeed!'
  56. echo 'publish sers succeed!'