1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- set -e
- # cd /root/temp/svn/Publish/DevOps/github-bash;bash startup.bash;
- #---------------------------------------------------------------------
- #(x.1)参数
- args_="
- export name=Sers
- export export GIT_SSH_SECRET=xxxxxx
- # "
- #----------------------------------------------
- #(x.2)当前路径
- curPath=$PWD
- cd $curPath/../../..
- export basePath=$PWD
- cd $curPath
- # export basePath=/root/temp/svn
- #----------------------------------------------
- echo "(x.3)get version"
- export version=`grep '<Version>' $(grep '<pack>\|<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
- echo $version
- #----------------------------------------------
- #(x.4)bash
- for file in *.sh
- do
- echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- echo "[$(date "+%H:%M:%S")]" bash $file
- bash $file
- done
|