30.nuget-pack.sh 775 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. set -e
  2. # bash 30.nuget-build.sh
  3. #---------------------------------------------------------------------
  4. #(x.1)参数
  5. args_="
  6. export codePath=/root/temp/svn/dotnet
  7. # "
  8. nugetPath=Doc/Publish/nuget
  9. #----------------------------------------------
  10. echo "(x.2)nuget-pack"
  11. docker run -i --rm \
  12. --env LANG=C.UTF-8 \
  13. -v $codePath:/root/code \
  14. serset/dotnet:6.0-sdk \
  15. bash -c "
  16. cd /root/code
  17. for file in \$(grep -a '<TargetFramework>netstandard2.0</TargetFramework>' . -rl --include *.csproj)
  18. do
  19. if ! [[ \$file =~ (Apm|Empty|Temp|Zmq|SharedMemory|\\-) ]]; then
  20. echo pack \$file
  21. cd /root/code
  22. cd \$(dirname \"\$file\")
  23. dotnet build --configuration Release
  24. dotnet pack --configuration Release --output '/root/code/$nugetPath'
  25. fi
  26. done
  27. "