30.nuget-pack.sh 684 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. set -e
  2. # bash 30.nuget-pack.sh
  3. #---------------------------------------------------------------------
  4. #(x.1)参数
  5. args_="
  6. export codePath=/root/temp/svn
  7. # "
  8. mkdir -p $codePath/Publish/release/release/nuget
  9. nugetPath=Publish/release/release/nuget
  10. #----------------------------------------------
  11. echo "(x.2)nuget-pack"
  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. cd /root/code
  18. for file in \$(grep -a '<pack/>' . -rl --include *.csproj)
  19. do
  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. done
  26. "