startup.bash 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. set -e
  2. # cd /root/temp/svn/Publish/DevOps/release-bash;bash startup.bash;
  3. #---------------------------------------------------------------------
  4. #(x.1)参数
  5. args_="
  6. export APPNAME=xxxxxx
  7. export DOCKER_ImagePrefix=serset/
  8. export DOCKER_USERNAME=serset
  9. export DOCKER_PASSWORD=xxx
  10. export NUGET_SERVER=https://api.nuget.org/v3/index.json
  11. export NUGET_KEY=xxxxxxxxxx
  12. # "
  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.3)get appVersion"
  22. export appVersion=`grep '<Version>' $(find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \; | head -n 1) | grep -oE '\>(.*)\<' | tr -d '<>/'`
  23. echo appVersion: $appVersion
  24. #----------------------------------------------
  25. #(x.4)bash
  26. for file in *.sh
  27. do
  28. echo "-----------------------------------------------------------------"
  29. echo "[$(date "+%H:%M:%S")] sh $file"
  30. sh $file
  31. done