startup.bash 965 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. set -e
  2. # cd /root/temp/svn/Publish/DevOps/release-bash;bash startup.bash;
  3. #---------------------------------------------------------------------
  4. #(x.1)参数
  5. args_="
  6. export DOCKER_USERNAME=serset
  7. export DOCKER_PASSWORD=xxx
  8. export NUGET_SERVER=https://api.nuget.org/v3/index.json
  9. export NUGET_KEY=xxxxxxxxxx
  10. # "
  11. #----------------------------------------------
  12. #(x.2)当前路径
  13. curPath=$PWD
  14. cd $curPath/../../..
  15. export basePath=$PWD
  16. cd $curPath
  17. # export basePath=/root/temp/svn
  18. #----------------------------------------------
  19. echo "(x.3)get version"
  20. export version=`grep '<Version>' $(grep '<pack>\|<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
  21. echo $version
  22. #----------------------------------------------
  23. #(x.4)bash
  24. for file in *.sh
  25. do
  26. echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  27. echo "[$(date "+%H:%M:%S")]" bash $file
  28. bash $file
  29. done