40.Station-publish-multiple.bash 896 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. set -e
  2. #---------------------------------------------------------------------
  3. # args
  4. args_="
  5. export basePath=/root/temp/svn
  6. export NUGET_PATH=$basePath/Publish/release/.nuget
  7. # "
  8. curPath=$PWD
  9. cd $curPath/../../..
  10. export basePath=$PWD
  11. cd $curPath
  12. #----------------------------------------------
  13. echo "40.Station-publish-multiple.bash"
  14. for netVersion in net5.0 netcoreapp3.1 netcoreapp3.0 netcoreapp2.2 netcoreapp2.1
  15. do
  16. echo "#2.1 publish netVersion: $netVersion"
  17. echo "#2.2 change netVersion to $netVersion in csproj"
  18. sed -i 's/net6.0/'"$netVersion"'/g' `find ${basePath} -name *.csproj -exec grep '<publish>' -l {} \;`
  19. echo "#2.3 sh 40.Station-publish.sh"
  20. cd $curPath
  21. sh 40.Station-publish.sh
  22. echo "#2.4 change back netVersion to net6.0 in csproj"
  23. sed -i 's/'"$netVersion"'/net6.0/g' `find ${basePath} -name *.csproj -exec grep '<publish>' -l {} \;`
  24. done
  25. cd $curPath