40.Station-publish(netcoreapp2.2).sh 666 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. set -e
  2. #---------------------------------------------------------------------
  3. #(x.1)参数
  4. args_="
  5. export basePath=/root/temp/svn
  6. # "
  7. curPath=$PWD
  8. #----------------------------------------------
  9. echo "(x.2)netVersion"
  10. netVersion=netcoreapp2.2
  11. #----------------------------------------------
  12. echo "(x.3)publish $netVersion"
  13. #修改csproj文件中的版本号
  14. cd $basePath
  15. sed -i 's/net5.0/'"$netVersion"'/g' `grep -a '<publish>' . -rl --include *.csproj`
  16. cd $curPath
  17. bash 40.Station-publish.sh;
  18. #还原csproj文件中的版本号为net5.0
  19. cd $basePath
  20. sed -i 's/'"$netVersion"'/net5.0/g' `grep -a '<publish>' . -rl --include *.csproj`
  21. cd $curPath