startup.bash 1.3 KB

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