startup.bash 924 B

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