startup.bash 1.3 KB

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