40.dotnet-publish.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. set -e
  2. # bash 30.nuget-build.sh
  3. #---------------------------------------------------------------------
  4. #(x.1)参数
  5. args_="
  6. export codePath=/root/temp/svn/dotnet
  7. # "
  8. export netVersion=netcoreapp2.1
  9. #----------------------------------------------
  10. echo "(x.2)dotnet-publish"
  11. echo "dotnet version: ${netVersion}"
  12. docker run -i --rm \
  13. --env LANG=C.UTF-8 \
  14. -v $codePath:/root/code \
  15. serset/dotnet:6.0-sdk \
  16. bash -c "
  17. echo 'publish Gateway'
  18. cd /root/code/Gateway/App.Gateway
  19. dotnet build --configuration Release
  20. dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Gateway
  21. echo 'publish Gover'
  22. cd /root/code/ServiceCenter/App.Gover.Gateway
  23. dotnet build --configuration Release
  24. dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Gover
  25. echo 'publish ServiceCenter'
  26. cd /root/code/ServiceCenter/App.ServiceCenter
  27. dotnet build --configuration Release
  28. dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/ServiceCenter
  29. echo 'publish Demo'
  30. cd /root/code/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo
  31. dotnet build --configuration Release
  32. dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Demo
  33. echo 'publish Robot'
  34. cd /root/code/ServiceStation/Demo/StressTest/App.Robot.Station
  35. dotnet build --configuration Release
  36. dotnet publish --configuration Release --output /root/code/Doc/Publish/SersPublish/${netVersion}/Robot
  37. "
  38. #----------------------------------------------
  39. echo "(x.3)dotnet-copy file"
  40. cp $codePath