startup.bash 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 WebDav_BaseUrl="https://nextcloud.xxx.com/remote.php/dav/files/release/releaseFiles/ki_jenkins"
  12. export WebDav_User="username:pwd"
  13. # "
  14. #----------------------------------------------
  15. # cur path
  16. curPath=$PWD
  17. cd $curPath/../../..
  18. export basePath=$PWD
  19. cd $curPath
  20. # export basePath=/root/temp/svn
  21. if [ ! $APPNAME ]; then
  22. export APPNAME=$(cat "$basePath/Publish/DevOps2/environment/env.APPNAME.txt" | tr -d '\n')
  23. echo "APPNAME: [${APPNAME}]"
  24. fi
  25. #----------------------------------------------
  26. echo '#1 build'
  27. cd $basePath/Publish/DevOps2/build-bash; bash startup.bash;
  28. if [ -f "$basePath/Publish/DevOps2/environment/github-bash__publish-multiple-netcore-version.txt" ]; then
  29. cd $basePath/Publish/DevOps2/build-bash; bash 40.Station-publish-multiple.bash;
  30. fi
  31. #----------------------------------------------
  32. echo '#2 release-bash'
  33. cd $basePath/Publish/DevOps2/release-bash; bash startup.bash;
  34. #----------------------------------------------
  35. echo "#3 get appVersion"
  36. cd $basePath/Publish/DevOps2/build-bash; source 19.get-app-version.bash;
  37. #----------------------------------------------
  38. echo "#4 bash"
  39. cd $curPath
  40. for file in *.sh
  41. do
  42. echo "-----------------------------------------------------------------"
  43. echo "[$(date "+%H:%M:%S")]" sh $file
  44. sh $file
  45. done