31.nuget-push.sh 595 B

12345678910111213141516171819202122232425262728293031323334353637
  1. set -e
  2. #---------------------------------------------------------------------
  3. #(x.1)参数
  4. args_="
  5. export codePath=/root/temp/svn
  6. export NUGET_SERVER=https://api.nuget.org/v3/index.json
  7. export NUGET_KEY=xxxxxxxxxx
  8. # "
  9. export nugetPath=dotnet/Doc/Publish/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. for file in /root/code/$nugetPath/*.nupkg
  18. do
  19. echo nuget push \$file
  20. dotnet nuget push \$file -k ${NUGET_KEY} -s ${NUGET_SERVER}
  21. done
  22. "