lith %!s(int64=2) %!d(string=hai) anos
pai
achega
74537b02ee
Modificáronse 23 ficheiros con 358 adicións e 576 borrados
  1. 51 0
      Publish/DevOps/build-bash/20.change-app-version.bash
  2. 0 49
      Publish/DevOps/build-bash/20.change-release-version.bash
  3. 51 0
      Publish/DevOps/build-bash/21.change-to-next-version.bash
  4. 46 0
      Publish/DevOps/build-bash/40.Station-publish-multiple.bash
  5. 17 21
      Publish/DevOps/build-bash/40.Station-publish.sh
  6. 6 8
      Publish/DevOps/build-bash/41.StressTest-publish.sh
  7. 9 15
      Publish/DevOps/build-bash/50.docker-image-create.sh
  8. 6 17
      Publish/DevOps/build-bash/startup.bash
  9. 0 38
      Publish/DevOps/build-multiple-bash/40.Station-publish(net6.0).sh
  10. 0 38
      Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp2.1).sh
  11. 0 38
      Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp2.2).sh
  12. 0 38
      Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp3.0).sh
  13. 0 38
      Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp3.1).sh
  14. 0 104
      Publish/DevOps/build-multiple-bash/41.StressTest-publish.sh
  15. 0 43
      Publish/DevOps/build-multiple-bash/startup.bash
  16. 1 1
      Publish/DevOps/github-bash/startup.bash
  17. 78 0
      Publish/DevOps/jenkins-bash/05.svn-merge.bash
  18. 68 47
      Publish/DevOps/jenkins-bash/release.jenkins.pipeline
  19. 0 57
      Publish/DevOps/jenkins-bash/startup.bash
  20. 2 2
      Publish/DevOps/release-bash/71.file-zip.sh
  21. 1 1
      Publish/DevOps/release-bash/72.nuget-push.sh
  22. 16 15
      Publish/DevOps/release-bash/73.docker-image-build-push.sh
  23. 6 6
      Publish/DevOps/release-bash/startup.bash

+ 51 - 0
Publish/DevOps/build-bash/20.change-app-version.bash

@@ -0,0 +1,51 @@
+set -e
+
+# export versionSuffix='.1234.preview'
+# bash 20.change-release-version.bash
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export versionSuffix=''
+
+# "
+
+
+#----------------------------------------------
+#(x.2)当前路径 
+curPath=$PWD
+
+cd $curPath/../../..
+export basePath=$PWD
+cd $curPath
+
+
+
+#----------------------------------------------
+echo "#1 get version" 
+export version=`grep '<Version>' $(find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \; | head -n 1) | grep -oE '\>(.*)\<' | tr -d '<>/'`
+echo "version from csproj: $version"
+
+# get v1 v2 v3
+v1=$(echo $version | tr '.' '\n' | sed -n 1p)
+v2=$(echo $version | tr '.' '\n' | sed -n 2p)
+v3=$(echo $version | tr '.-' '\n' | sed -n 3p)
+
+
+#export appVersion="${version%%-*}$versionSuffix"
+export appVersion="$v1.$v2.$v3$versionSuffix"
+echo "appVersion: $appVersion"
+
+
+#----------------------------------------------
+echo "#2 change app version from [$version] to [$appVersion]" 
+sed -i 's/'"$version"'/'"$appVersion"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
+
+
+
+
+#----------------------------------------------
+#9
+cd $curPath

+ 0 - 49
Publish/DevOps/build-bash/20.change-release-version.bash

@@ -1,49 +0,0 @@
-set -e
-
-# export versionSuffix='.1234.preview'
-# bash 20.change-release-version.bash
-
-
-#---------------------------------------------------------------------
-#(x.1)参数
-args_="
-
-export versionSuffix=''
-
-# "
-
-
-#----------------------------------------------
-#(x.2)当前路径 
-curPath=$PWD
-
-cd $curPath/../../..
-export basePath=$PWD
-cd $curPath
-
-
-
-#----------------------------------------------
-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: $version"
-
-
-export releaseVersion="${version%%-*}$versionSuffix"
-echo "releaseVersion: $releaseVersion"
-
-
-#----------------------------------------------
-if [ -n "$versionSuffix" ]; then
-	echo "(x.4) change release version from [$version] to [$releaseVersion]" 
-	 
-	cd $basePath
-	sed -i 's/'"$version"'/'"$releaseVersion"'/g'  `grep -a '<pack>\|<publish>' . -rl --include *.csproj`
-fi
-
-
-
-
-#----------------------------------------------
-#(x.9)
-cd $curPath

+ 51 - 0
Publish/DevOps/build-bash/21.change-to-next-version.bash

@@ -0,0 +1,51 @@
+set -e
+
+# export versionSuffix='.1234.preview'
+# bash 21.change-to-next-version.bash
+
+
+#---------------------------------------------------------------------
+#(x.1)参数
+args_="
+
+export versionSuffix=''
+
+# "
+
+
+#----------------------------------------------
+#(x.2)当前路径 
+curPath=$PWD
+
+cd $curPath/../../..
+export basePath=$PWD
+cd $curPath
+
+
+
+#----------------------------------------------
+echo "#1 get version" 
+export version=`grep '<Version>' $(find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \; | head -n 1) | grep -oE '\>(.*)\<' | tr -d '<>/'`
+echo "version from csproj: $version"
+
+# get v1 v2 v3
+v1=$(echo $version | tr '.' '\n' | sed -n 1p)
+v2=$(echo $version | tr '.' '\n' | sed -n 2p)
+v3=$(echo $version | tr '.-' '\n' | sed -n 3p)
+((v3++));
+
+
+export appVersion="$v1.$v2.$v3$versionSuffix"
+echo "appVersion: $appVersion"
+
+
+#----------------------------------------------
+echo "#2 change app version from [$version] to [$appVersion]" 
+sed -i 's/'"$version"'/'"$appVersion"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
+
+
+
+
+#----------------------------------------------
+#9
+cd $curPath

+ 46 - 0
Publish/DevOps/build-bash/40.Station-publish-multiple.bash

@@ -0,0 +1,46 @@
+set -e
+
+
+#---------------------------------------------------------------------
+# 参数
+args_="
+
+export basePath=/root/temp/svn
+export NUGET_PATH=$basePath/Publish/release/.nuget
+
+# "
+
+
+curPath=$PWD
+
+cd $curPath/../../..
+export basePath=$PWD
+cd $curPath
+
+#----------------------------------------------
+echo "40.Station-publish-multiple.bash"
+
+for netVersion in net6.0 netcoreapp3.1 netcoreapp3.0 netcoreapp2.2 netcoreapp2.1
+do
+	echo "#2.1 publish netVersion: $netVersion"
+
+	echo "#2.2 change netVersion to $netVersion in csproj"
+	sed -i 's/net5.0/'"$netVersion"'/g' `find ${basePath} -name *.csproj -exec grep '<publish>' -l {} \;`
+
+
+	echo "#2.3 sh 40.Station-publish.sh"
+	cd $curPath
+	sh 40.Station-publish.sh
+
+
+	echo "#2.4 change back netVersion to net5.0 in csproj"
+	sed -i 's/'"$netVersion"'/net5.0/g' `find ${basePath} -name *.csproj -exec grep '<publish>' -l {} \;`
+
+done
+
+
+
+cd $curPath
+
+
+

+ 17 - 21
Publish/DevOps/build-bash/40.Station-publish.sh

@@ -2,7 +2,7 @@ set -e
 
 
 #---------------------------------------------------------------------
-#(x.1)参数
+# 参数
 args_="
 
 export basePath=/root/temp/svn
@@ -14,21 +14,11 @@ if [ ! $NUGET_PATH ]; then NUGET_PATH=$basePath/Publish/release/.nuget; fi
 
 
 #----------------------------------------------
-echo "(x.2)获取netVersion" 
-netVersion=`grep '<TargetFramework>' $(grep '<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
+echo "40.Station-publish.sh 查找所有需要发布的项目并发布"
 
 
-publishPath=$basePath/Publish/release/release/Station\($netVersion\)
-echo publish Station
-echo dotnet version: $netVersion
 
 
-#----------------------------------------------
-echo "(x.3)查找所有需要发布的项目并发布"
-
-
-mkdir -p $publishPath
-
 docker run -i --rm \
 --env LANG=C.UTF-8 \
 -v $NUGET_PATH:/root/.nuget \
@@ -37,10 +27,16 @@ serset/dotnet:sdk-6.0 \
 bash -c "
 set -e
 
+echo '#1 get netVersion'
+netVersion=\$(grep '<TargetFramework>' \$(grep '<publish>' -rl --include *.csproj /root/code | head -n 1) | grep -oP '>(.*)<' | tr -d '<>')
+echo netVersion: \$netVersion
+
+
 basePath=/root/code
-publishPath=\$basePath/Publish/release/release/Station\($netVersion\)
+publishPath=\$basePath/Publish/release/release/Station\(\$netVersion\)
+mkdir -p \$publishPath
 
-#(x.3)查找所有需要发布的项目并发布
+echo '#2 publish Station'
 cd \$basePath
 for file in \$(grep -a '<publish>' . -rl --include *.csproj)
 do
@@ -57,19 +53,19 @@ do
 	dotnet publish --configuration Release --output \"\$publishPath/\$publishName\"
 
 	#copy xml
-	for filePath in bin/Release/$netVersion/*.xml ; do \\cp -rf \$filePath \"\$publishPath/\$publishName\";done
+	for filePath in bin/Release/\$netVersion/*.xml ; do \\cp -rf \$filePath \"\$publishPath/\$publishName\";done
 done
 
 
-#(x.4)copy dir
+echo '#3 copy ReleaseFile'
 \cp -rf \$basePath/Publish/ReleaseFile/Station/. \"\$publishPath\"
 
 
-#(x.5)copy ServiceCenter
-mkdir -p \"\$basePath/Publish/release/release/ServiceCenter($netVersion)\"
-\cp -rf \$publishPath/ServiceCenter/. \"\$basePath/Publish/release/release/ServiceCenter($netVersion)/ServiceCenter\"
-\cp -rf \"\$publishPath/01.ServiceCenter.bat\" \"\$basePath/Publish/release/release/ServiceCenter($netVersion)\"
-\cp -rf \"\$publishPath/01.Start-4580.bat\" \"\$basePath/Publish/release/release/ServiceCenter($netVersion)\"
+echo '#4 copy ServiceCenter'
+mkdir -p \"\$basePath/Publish/release/release/ServiceCenter(\$netVersion)\"
+\cp -rf \$publishPath/ServiceCenter/. \"\$basePath/Publish/release/release/ServiceCenter(\$netVersion)/ServiceCenter\"
+\cp -rf \"\$publishPath/01.ServiceCenter.bat\" \"\$basePath/Publish/release/release/ServiceCenter(\$netVersion)\"
+\cp -rf \"\$publishPath/01.Start-4580.bat\" \"\$basePath/Publish/release/release/ServiceCenter(\$netVersion)\"
 
 
 "

+ 6 - 8
Publish/DevOps/build-bash/41.StressTest-publish.sh

@@ -2,7 +2,7 @@ set -e
 
 
 #---------------------------------------------------------------------
-#(x.1)参数
+# 参数
 args_="
 
 export basePath=/root/temp/svn
@@ -14,15 +14,12 @@ if [ ! $NUGET_PATH ]; then NUGET_PATH=$basePath/Publish/release/.nuget; fi
 
 
 #---------------------------------------------------------------------
-#(x.2)
+echo '41.StressTest-publish.sh  #1 发布CL压测'
+
 publishPath=$basePath/Publish/release/release/StressTest
 mkdir -p $publishPath
 
 
-
-echo ------------------------------------------------------------------
-echo '(x.3)发布CL压测'
-
 docker run -i --rm \
 --env LANG=C.UTF-8 \
 -v $basePath:/root/code \
@@ -49,9 +46,10 @@ echo 'copy bat'
 
 
 
-echo ------------------------------------------------------------------
-echo '(x.4)发布Sers压测'
+#---------------------------------------------------------------------
+echo '41.StressTest-publish.sh  #2 发布Sers压测'
 
+# for netVersion in net5.0 netcoreapp2.1
 for netVersion in net5.0
 do
 	appPath=${basePath}/Publish/release/release/Station\(${netVersion}\)

+ 9 - 15
Publish/DevOps/build-bash/50.docker-image-create.sh

@@ -2,7 +2,7 @@ set -e
 
 
 #---------------------------------------------------------------------
-#(x.1)参数
+# 参数
 args_="
 
 export basePath=/root/temp/svn
@@ -11,37 +11,31 @@ export basePath=/root/temp/svn
 
  
 #---------------------------------------------------------------------
-#(x.2)
+echo "#1 copy docker-image from ReleaseFile"
+
 publishPath="$basePath/Publish/release/release/Station(net5.0)"
 dockerPath=$basePath/Publish/release/release/docker-image
 
 
-
-#---------------------------------------------------------------------
-echo "(x.3)copy dir"
 \cp -rf "$basePath/Publish/ReleaseFile/docker-image/." "$dockerPath"
 
 
 #---------------------------------------------------------------------
-echo "(x.4)copy station"
-#查找所有需要发布的项目并copy
-cd $basePath
-for file in $(grep -a '<docker>' . -rl --include *.csproj)
+echo "#2 copy station"
+for file in $(find $basePath -name *.csproj -exec grep '<docker>' -l {} \;)
 do
 	cd $basePath
 	
-	#get publishName
-	publishName=`grep '<publish>' $file -r | grep -oP '>(.*)<' | tr -d '<>'`
+	publishName=`grep '<publish>' $file -r | grep -oE '\>(.*)\<' | tr -d '<>/'`
 	
-	#get dockerName
-	dockerName=`grep '<docker>' $file -r | grep -oP '>(.*)<' | tr -d '<>'`
+	dockerName=`grep '<docker>' $file -r | grep -oE '\>(.*)\<' | tr -d '<>/'`
 
-	echo copy $dockerName
+	echo "#2.* copy $dockerName, publishName:$publishName"
 	\cp -rf "$publishPath/$publishName/." "$dockerPath/$dockerName/app"
 done
 
 
-#copy单体压测
+echo "#3 copy 单体压测"
 \cp -rf "$basePath/Publish/release/release/StressTest/单体压测net5.0/ServiceCenter/." "$dockerPath/sers-demo-sersall/app"
  
 

+ 6 - 17
Publish/DevOps/build-bash/startup.bash

@@ -3,7 +3,7 @@ set -e
 # cd /root/docker-data/dev/jenkins/jenkins_home/workspace/Repo/Sers/code/Publish/DevOps/build-bash;bash startup.bash;
 
 #----------------------------------------------
-#(x.1)当前路径 
+# cur path 
 curPath=$PWD
 
 cd $curPath/../../..
@@ -15,29 +15,18 @@ cd $curPath
 
 
 #----------------------------------------------
-echo "(x.2)get version" 
-export version=`grep '<Version>' $(grep '<pack>\|<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
-echo $version
-
- 
-
-
-#----------------------------------------------
-echo "(x.3)build $version"
+echo "build-bash/startup.bash"
 
 for file in *.sh
 do
-    echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    echo "[$(date "+%H:%M:%S")]" bash $file
-    bash $file
+    echo "\n\n\n\n\n-----------------------------------------------------------------"
+    echo "[$(date "+%H:%M:%S")] sh $file"
+    sh $file
 done
 
 
 
-
-
-
  
 #----------------------------------------------
-#(x.9)
+#9
 cd $curPath

+ 0 - 38
Publish/DevOps/build-multiple-bash/40.Station-publish(net6.0).sh

@@ -1,38 +0,0 @@
-set -e
-
-
-#---------------------------------------------------------------------
-#(x.1)参数
-args_="
-
-export basePath=/root/temp/svn
-
-# "
-
-curPath=$PWD
-
-
-#----------------------------------------------
-echo "(x.2)netVersion"
-netVersion=net6.0
-
-
-
-#---------------------------------------------- 
-echo "(x.3)publish $netVersion"
-
-#修改csproj文件中的版本号
-cd $basePath
-sed -i 's/net5.0/'"$netVersion"'/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-cd $curPath
-bash 40.Station-publish.sh;
-
-
-#还原csproj文件中的版本号为net5.0
-cd $basePath
-sed -i 's/'"$netVersion"'/net5.0/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-
-cd $curPath
-

+ 0 - 38
Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp2.1).sh

@@ -1,38 +0,0 @@
-set -e
-
-
-#---------------------------------------------------------------------
-#(x.1)参数
-args_="
-
-export basePath=/root/temp/svn
-
-# "
-
-curPath=$PWD
-
-
-#----------------------------------------------
-echo "(x.2)netVersion"
-netVersion=netcoreapp2.1
-
-
-
-#---------------------------------------------- 
-echo "(x.3)publish $netVersion"
-
-#修改csproj文件中的版本号
-cd $basePath
-sed -i 's/net5.0/'"$netVersion"'/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-cd $curPath
-bash 40.Station-publish.sh;
-
-
-#还原csproj文件中的版本号为net5.0
-cd $basePath
-sed -i 's/'"$netVersion"'/net5.0/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-
-cd $curPath
-

+ 0 - 38
Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp2.2).sh

@@ -1,38 +0,0 @@
-set -e
-
-
-#---------------------------------------------------------------------
-#(x.1)参数
-args_="
-
-export basePath=/root/temp/svn
-
-# "
-
-curPath=$PWD
-
-
-#----------------------------------------------
-echo "(x.2)netVersion"
-netVersion=netcoreapp2.2
-
-
-
-#---------------------------------------------- 
-echo "(x.3)publish $netVersion"
-
-#修改csproj文件中的版本号
-cd $basePath
-sed -i 's/net5.0/'"$netVersion"'/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-cd $curPath
-bash 40.Station-publish.sh;
-
-
-#还原csproj文件中的版本号为net5.0
-cd $basePath
-sed -i 's/'"$netVersion"'/net5.0/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-
-cd $curPath
-

+ 0 - 38
Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp3.0).sh

@@ -1,38 +0,0 @@
-set -e
-
-
-#---------------------------------------------------------------------
-#(x.1)参数
-args_="
-
-export basePath=/root/temp/svn
-
-# "
-
-curPath=$PWD
-
-
-#----------------------------------------------
-echo "(x.2)netVersion"
-netVersion=netcoreapp3.0
-
-
-
-#---------------------------------------------- 
-echo "(x.3)publish $netVersion"
-
-#修改csproj文件中的版本号
-cd $basePath
-sed -i 's/net5.0/'"$netVersion"'/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-cd $curPath
-bash 40.Station-publish.sh;
-
-
-#还原csproj文件中的版本号为net5.0
-cd $basePath
-sed -i 's/'"$netVersion"'/net5.0/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-
-cd $curPath
-

+ 0 - 38
Publish/DevOps/build-multiple-bash/40.Station-publish(netcoreapp3.1).sh

@@ -1,38 +0,0 @@
-set -e
-
-
-#---------------------------------------------------------------------
-#(x.1)参数
-args_="
-
-export basePath=/root/temp/svn
-
-# "
-
-curPath=$PWD
-
-
-#----------------------------------------------
-echo "(x.2)netVersion"
-netVersion=netcoreapp3.1
-
-
-
-#---------------------------------------------- 
-echo "(x.3)publish $netVersion"
-
-#修改csproj文件中的版本号
-cd $basePath
-sed -i 's/net5.0/'"$netVersion"'/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-cd $curPath
-bash 40.Station-publish.sh;
-
-
-#还原csproj文件中的版本号为net5.0
-cd $basePath
-sed -i 's/'"$netVersion"'/net5.0/g'  `grep -a '<publish>' . -rl --include *.csproj`
-
-
-cd $curPath
-

+ 0 - 104
Publish/DevOps/build-multiple-bash/41.StressTest-publish.sh

@@ -1,104 +0,0 @@
-set -e
-
-
-#---------------------------------------------------------------------
-#(x.1)参数
-args_="
-
-export basePath=/root/temp/svn
-export NUGET_PATH=$basePath/Publish/release/.nuget
-
-# "
-
-if [ ! $NUGET_PATH ]; then NUGET_PATH=$basePath/Publish/release/.nuget; fi
-
-
-#---------------------------------------------------------------------
-#(x.2)
-publishPath=$basePath/Publish/release/release/StressTest
-mkdir -p $publishPath
-
-
-
-echo ------------------------------------------------------------------
-echo '(x.3)发布CL压测'
-
-docker run -i --rm \
---env LANG=C.UTF-8 \
--v $basePath:/root/code \
--v $NUGET_PATH:/root/.nuget \
-serset/dotnet:sdk-6.0 \
-bash -c "
-set -e
-
-echo 'publish Client'
-cd /root/code/dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmClient
-dotnet build --configuration Release
-dotnet publish --configuration Release --output /root/code/Publish/release/release/StressTest/CL压测net5.0/CmClient
-
-echo 'publish Server'
-cd /root/code/dotnet/Library/Sers/Sers.CL/Test/CommunicationManage/CmServer
-dotnet build --configuration Release
-dotnet publish --configuration Release --output /root/code/Publish/release/release/StressTest/CL压测net5.0/CmServer
-
-echo 'copy bat'
-\cp -rf /root/code/Publish/ReleaseFile/StressTest/CL压测/. /root/code/Publish/release/release/StressTest/CL压测net5.0
-
-" 
-
-
-
-
-echo ------------------------------------------------------------------
-echo '(x.4)发布Sers压测'
-
-for netVersion in netcoreapp2.1
-do
-	appPath=${basePath}/Publish/release/release/Station\(${netVersion}\)
-
-	#---------------------------------------------- 
-	#单体压测
-	echo "(x.5)单体压测${netVersion}"
-	targetPath=${publishPath}/单体压测${netVersion}
-	mkdir -p $targetPath
-
-	echo "(x.x.1)copy ServiceCenter"
-	\cp -rf $appPath/ServiceCenter/. $targetPath/ServiceCenter
-
-	echo "(x.x.2)copy demo"
-	\cp -rf $appPath/Demo/wwwroot/. $targetPath/ServiceCenter/wwwroot
-	\cp -rf $appPath/Demo/Did.SersLoader.Demo.dll $targetPath/ServiceCenter
-	\cp -rf $appPath/Demo/Did.SersLoader.Demo.pdb $targetPath/ServiceCenter
-	\cp -rf $appPath/Demo/Did.SersLoader.Demo.xml $targetPath/ServiceCenter 
-
-	echo "(x.x.3)copy Robot"
-	\cp -rf $appPath/Robot/wwwroot/. $targetPath/ServiceCenter/wwwroot
-	\cp -rf $appPath/Robot/App.Robot.Station.dll $targetPath/ServiceCenter
-	\cp -rf $appPath/Robot/App.Robot.Station.pdb $targetPath/ServiceCenter
-	\cp -rf $appPath/Robot/App.Robot.Station.xml $targetPath/ServiceCenter 
-
-	echo "(x.x.4)copy ReleaseFile"
-	\cp -rf $basePath/Publish/ReleaseFile/StressTest/单体压测/. $targetPath
-
-
-
-	#---------------------------------------------- 
-	#分布式压测
-	echo "(x.6)分布式压测${netVersion}"
-	targetPath=${publishPath}/分布式压测${netVersion}
-	mkdir -p $targetPath
-
-	echo "(x.x.1)copy  station"
-	\cp -rf $appPath/ServiceCenter $targetPath
-	\cp -rf $appPath/Demo $targetPath
-	\cp -rf $appPath/Robot $targetPath
-
-	echo "(x.x.2)copy ReleaseFile"
-	\cp -rf $basePath/Publish/ReleaseFile/StressTest/分布式压测/. $targetPath
-
-done
-
-
-
-
-

+ 0 - 43
Publish/DevOps/build-multiple-bash/startup.bash

@@ -1,43 +0,0 @@
-set -e
-
-# cd /root/docker-data/dev/jenkins/jenkins_home/workspace/Repo/Sers/code/Publish/DevOps/build-bash;bash startup.bash;
-
-#----------------------------------------------
-#(x.1)当前路径 
-curPath=$PWD
-
-cd $curPath/../../..
-export basePath=$PWD
-cd $curPath
-
-
-
-
-
-#----------------------------------------------
-echo "(x.2)get version" 
-export version=`grep '<Version>' $(grep '<pack>\|<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
-echo $version
-
- 
-
-
-#----------------------------------------------
-echo "(x.3)build $version"
-
-for file in *.sh
-do
-    echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    echo "[$(date "+%H:%M:%S")]" bash $file
-    bash $file
-done
-
-
-
-
-
-
- 
-#----------------------------------------------
-#(x.9)
-cd $curPath

+ 1 - 1
Publish/DevOps/github-bash/startup.bash

@@ -33,7 +33,7 @@ cd $curPath
 #---------------------------------------------- 
 echo '(x.4)build'
 cd $basePath/Publish/DevOps/build-bash; bash startup.bash;
-cd $basePath/Publish/DevOps/build-multiple-bash; bash startup.bash;
+cd $basePath/Publish/DevOps/build-bash; bash 40.Station-publish-multiple.bash;
 
 
 #---------------------------------------------- 

+ 78 - 0
Publish/DevOps/jenkins-bash/05.svn-merge.bash

@@ -0,0 +1,78 @@
+set -e
+
+# source 05.svn-merge.bash
+
+
+#---------------------------------------------------------------------
+# (x.1)参数
+args_="
+  export      codePath=/root/docker-cache/jenkins/jenkins_home/workspace/Sers/develop/20/code-with-prod-version
+  export      SVN_PATH=svn://svn.ki.lith.cloud/Sers
+  export      SVN_USERNAME=jenkins
+  export      SVN_PASSWORD=**
+  export      versionSuffix=.158
+# "
+
+
+docker run -i --rm -v $codePath:/root/svn \
+-e codePath="$codePath" -e SVN_PATH="$SVN_PATH" -e SVN_USERNAME="$SVN_USERNAME" -e SVN_PASSWORD="$SVN_PASSWORD" -e versionSuffix="$versionSuffix" \
+docker.lith.cloud:8/dockerhub/serset/svn-client bash -c '
+set -e
+
+# (x.2) change version in csproj and commit to develop branch
+# (x.x.1) pull code from develop branch
+codePath=/root/svn/branch-develop
+mkdir -p $codePath;cd $codePath;
+svn checkout $SVN_PATH/branches/develop $codePath --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache  > /dev/null;
+
+# (x.x.2) change version in csproj
+export versionSuffix=$versionSuffix
+cd $codePath/Publish/DevOps/build-bash; source 20.change-app-version.bash; 
+echo "appVersion: $appVersion"
+cd $codePath;
+
+# (x.x.3) commit to develop branch
+svn commit $codePath -m "[tag] Sers $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+
+
+
+# (x.3) merge to trunk
+# (x.x.1) pull code from trunk branch
+codePath=/root/svn/branch-trunk
+mkdir -p $codePath;cd $codePath;
+svn checkout $SVN_PATH/trunk $codePath --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache > /dev/null;
+
+# (x.x.2) merge to trunk
+svn merge $SVN_PATH/branches/develop --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+# (x.x.3) commit to trunk branch
+svn commit $codePath -m "[trunk] merge from develop:$appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+
+
+# (x.4) create tag branch from trunk
+echo "appVersion: $appVersion"
+svn copy $SVN_PATH/trunk $SVN_PATH/tags/2.1/$appVersion -m "[tag] Sers $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+
+
+
+
+# (x.5) change to next version in csproj and commit to develop branch
+# (x.x.1) pull code from develop branch
+codePath=/root/svn/branch-develop-next
+mkdir -p $codePath;cd $codePath;
+svn checkout $SVN_PATH/branches/develop $codePath --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+# (x.x.2) change version in csproj
+export versionSuffix="-temp"
+cd $codePath/Publish/DevOps/build-bash; source 21.change-to-next-version.bash; 
+echo "appVersion: $appVersion"
+cd $codePath;
+
+# (x.x.3) commit to develop branch
+svn commit $codePath -m "[develop] $appVersion" --username $SVN_USERNAME --password $SVN_PASSWORD --no-auth-cache
+
+
+'

+ 68 - 47
Publish/DevOps/jenkins-bash/release.jenkins.pipeline

@@ -1,93 +1,114 @@
-pipeline { 
+pipeline {
     agent any
 
     environment {
-        basePath = "xx/develop/${env.build_number}"
+        basePath = "/root/docker-cache/jenkins/jenkins_home/workspace/Sers/develop/${env.build_number}"
         APPNAME = "Sers"
-        SVN_PATH = "  "
+
+        SVN_PATH = "svn://svn.ki.lith.cloud/Sers"
         SVN_USERNAME = "jenkins"
-        SVN_PASSWORD = "  "
+        SVN_PASSWORD = "**"
+
         NUGET_PATH = "/root/docker-cache/jenkins/jenkins_home/workspace/.nuget"
 
-        DEV_NUGET_SERVER = "http://nuget.lith.cloud:8"
-        DEV_NUGET_KEY = "  "
-        DEV_DOCKER_SERVER = "cache.docker.lith.cloud:8"
-        DEV_DOCKER_USERNAME = " "
-        DEV_DOCKER_PASSWORD = " "
+        NUGET_SERVER = "http://nuget.lith.cloud:8"
+        NUGET_KEY = "**"
 
-        PRD_NUGET_SERVER = "https://api.nuget.org/v3/index.json"
-        PRD_NUGET_KEY = "  "
-        PRD_DOCKER_SERVER = "serset"
-        PRD_DOCKER_USERNAME = "serset"
-        PRD_DOCKER_PASSWORD = "  "
+        DOCKER_SERVER = "docker-dev.lith.cloud:8"
+        DOCKER_USERNAME = " "
+        DOCKER_PASSWORD = " "
 
+        DOCKER_SERVER_Prd = "docker.lith.cloud:8"
+        DOCKER_USERNAME_Prd = " "
+        DOCKER_PASSWORD_Prd = " "
     }
     stages {
-        stage('#1.1 develop - init code') { 
+        stage('#1.1 develop - init code') {
             steps {
-                echo "build_number: ${env.build_number}"
-                echo "pull code from svn to Path: $basePath/develop"
-                sh "chroot /host bash -c 'set -e; mkdir -p $basePath/develop;chmod 777 $basePath/develop;    docker run -i --rm -v $basePath/develop:/root/svn docker.lith.cloud:8/dockerhub/serset/svn-client svn checkout \"$SVN_PATH\" /root/svn --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\" --no-auth-cache > /dev/null;  '"
+                script {
+                    env.codePath = "$basePath/develop"
+                }
+
+                echo "#1 build_number: ${env.build_number}"
+
+                echo "#1.1 pull code from svn to Path: $codePath"
+                sh "docker exec -i jenkins-dind sh -c 'set -e; mkdir -p $codePath;chmod 777 $codePath;    docker run -i --rm -v $codePath:/root/svn docker.lith.cloud:8/dockerhub/serset/svn-client svn checkout \"$SVN_PATH/branches/develop\" /root/svn --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\" --no-auth-cache > /dev/null;  '"
 
-		sh "chroot /host bash -c 'set -e; export versionSuffix=.${env.build_number}-preview;   cd $basePath/develop/Publish/DevOps/build-bash; bash 20.change-release-version.bash;  '"
+                echo "#1.2 change-app-version"
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export versionSuffix=-preview${env.build_number};   cd $codePath/Publish/DevOps/build-bash; sh 20.change-app-version.bash;  '"
             } 
         }
 
         stage('#1.2 develop - build') {
             steps {
-                sh "chroot /host bash -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $basePath/develop/Publish/DevOps/build-bash; bash startup.bash;  '"
-            } 
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps/build-bash; sh startup.bash;  '"
+            }
         }
 
-        stage('#1.3 develop - push') { 
+        stage('#1.3 develop - push') {
             steps {
-                sh "chroot /host bash -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$DEV_NUGET_SERVER; export NUGET_KEY=$DEV_NUGET_KEY;  export DOCKER_SERVER=${env.DEV_DOCKER_SERVER};export DOCKER_USERNAME=${env.DEV_DOCKER_USERNAME};export DOCKER_PASSWORD=${env.DEV_DOCKER_PASSWORD};    cd $basePath/develop/Publish/DevOps/release-bash; bash startup.bash;  '"
-            } 
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$NUGET_SERVER; export NUGET_KEY=$NUGET_KEY;  export DOCKER_SERVER=${env.DOCKER_SERVER};export DOCKER_USERNAME=${env.DOCKER_USERNAME};export DOCKER_PASSWORD=${env.DOCKER_PASSWORD};    cd $codePath/Publish/DevOps/release-bash; sh startup.bash;  '"
+            }
         }
 
-        stage('#2 deploy to prod?') { 
+        stage('#2 deploy to prod?') {
             steps {
                 timeout(time:1800,unit:'SECONDS') {
                     script { 
-                        inputData = input message: "Are you sure to continue to release to prod?", ok: 'Proceed?', parameters: [string(defaultValue: '', description: 'text comment', name: 'comment')], submitterParameter: 'APPROVER' 
-                    } 
+                        inputData = input message: "release to prod?", ok: 'Proceed?', parameters: [string(defaultValue: '', description: 'text comment', name: 'comment')], submitterParameter: 'APPROVER' 
+                    }
                 }
-            } 
+            }
         }
 
-        stage('#3.1 prd - init code') { 
+        stage('#3.1 prd - init code') {
             steps {
-                echo "build_number: ${env.build_number}"
-                echo "pull code from svn to Path: $basePath/prd"
-                sh "chroot /host bash -c 'set -e; mkdir -p $basePath/prd;chmod 777 $basePath/prd;    docker run -i --rm -v $basePath/prd:/root/svn docker.lith.cloud:8/dockerhub/serset/svn-client svn checkout \"$SVN_PATH\" /root/svn --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\" --no-auth-cache > /dev/null;  '"
+                script {
+                    env.codePath = "$basePath/prd"
+                }
 
-                sh "chroot /host bash -c 'set -e; export versionSuffix=.${env.build_number};   cd $basePath/prd/Publish/DevOps/build-bash; bash 20.change-release-version.bash;  '"
-            } 
+                echo "#1 build_number: ${env.build_number}"
+
+                echo "#1.1 pull code from svn to Path: $codePath"
+                sh "docker exec -i jenkins-dind sh -c 'set -e; mkdir -p $codePath;chmod 777 $codePath;    docker run -i --rm -v $codePath:/root/svn docker.lith.cloud:8/dockerhub/serset/svn-client svn checkout \"$SVN_PATH/branches/develop\" /root/svn --username \"$SVN_USERNAME\" --password \"$SVN_PASSWORD\" --no-auth-cache > /dev/null;  '"
+
+                echo "#1.2 change-app-version"
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export versionSuffix=;   cd $codePath/Publish/DevOps/build-bash; sh 20.change-app-version.bash;  '"
+            }
         }
 
         stage('#3.2 prd - build') {
             steps {
-		sh "chroot /host bash -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $basePath/prd/Publish/DevOps/build-bash; bash startup.bash;  '"
-		sh "chroot /host bash -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $basePath/prd/Publish/DevOps/build-multiple-bash; bash startup.bash;  '"
-            } 
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps/build-bash; sh startup.bash;  '"
+
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME; export NUGET_PATH=$NUGET_PATH;    cd $codePath/Publish/DevOps/build-bash; sh 40.Station-publish-multiple.bash;  '"
+            }
         }
 
-        stage('#3.3 prd - push') { 
+        stage('#3.3 prd - push') {
             steps {
-                sh "chroot /host bash -c 'set -e; export APPNAME=$APPNAME;export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$DEV_NUGET_SERVER;export NUGET_KEY=$DEV_NUGET_KEY;  export DOCKER_SERVER=${env.DEV_DOCKER_SERVER};export DOCKER_USERNAME=${env.DEV_DOCKER_USERNAME};export DOCKER_PASSWORD=${env.DEV_DOCKER_PASSWORD};    cd $basePath/prd/Publish/DevOps/release-bash; bash startup.bash;  '"
-            } 
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export APPNAME=$APPNAME;export NUGET_PATH=$NUGET_PATH;    export NUGET_SERVER=$NUGET_SERVER;export NUGET_KEY=$NUGET_KEY;  export DOCKER_SERVER=${env.DOCKER_SERVER_Prd};export DOCKER_USERNAME=${env.DOCKER_USERNAME_Prd};export DOCKER_PASSWORD=${env.DOCKER_PASSWORD_Prd};    cd $codePath/Publish/DevOps/release-bash; sh startup.bash;  '"
+            }
+        }
+
+        stage('#3.4 prd - publish code') {
+            steps {
+                echo "build_number: ${env.build_number}"
+
+                sh "docker exec -i jenkins-dind sh -c 'set -e; export codePath=$basePath/code-with-prod-version;export SVN_PATH=$SVN_PATH;export SVN_USERNAME=$SVN_USERNAME;export SVN_PASSWORD=$SVN_PASSWORD;  export versionSuffix=;   cd $basePath/prd/Publish/DevOps/jenkins-bash; sh 05.svn-merge.bash;  '"
+            }
         }
  
-    } 
+    }
 
     post {
         always {
             timeout(time:3600,unit:'SECONDS') {
-                script { 
-                  env.inputData = input message: "Continue to clean temp files, will be waiting for 3600 seconds. click abort will skip clean.", ok: 'Proceed', parameters: [string(defaultValue: '', description: 'text comment', name: 'comment')], submitterParameter: 'approver'
-		  echo "input: ${env.inputData}"
+                script {
+                    env.inputData = input message: "Clean temp files, \n will wait for 3600 seconds. \n click abort to skip clean.", ok: 'Proceed', parameters: [string(defaultValue: '', description: 'text comment', name: 'comment')], submitterParameter: 'approver'
+                    echo "input: ${env.inputData}"
                }
-            }	    
+            }
             echo "clean temp files"
             sh "rm -rf /var/jenkins_home/workspace/Sers/develop/${env.build_number}"
         }
@@ -100,5 +121,5 @@ pipeline {
         aborted {
             echo "build aborted !"
         }
-    } 
-} 
+    }
+}

+ 0 - 57
Publish/DevOps/jenkins-bash/startup.bash

@@ -1,57 +0,0 @@
-set -e
-
-
-# cd /root/docker-data/dev/jenkins/jenkins_home/workspace/Repo/Sers/code/Publish/DevOps/jenkins-bash; bash startup.bash;
-
-#---------------------------------------------------------------------
-#(x.1)²ÎÊý
-args_="
-export APPNAME=xxxxxx
-
-export SVN_USERNAME=jenkins
-export SVN_PASSWORD=xxxxxx
-
-export DOCKER_USERNAME=serset
-export DOCKER_PASSWORD=xxxxxx
-
-export NUGET_SERVER=https://api.nuget.org/v3/index.json
-export NUGET_KEY=xxxxxx
-
-export NUGET_PATH=/root/docker-data/dev/jenkins/jenkins_home/workspace/.nuget
-
-# "
-
-#----------------------------------------------
-#(x.2)µ±Ç°Â·¾¶ 
-curPath=$PWD
-
-cd $curPath/../../..
-export basePath=$PWD
-cd $curPath
-
-# export basePath=/root/temp/svn
-
-
-
-#----------------------------------------------
-echo '(x.3)svn-update'
-bash 01.svn-update.sh;
-
-
- 
-
-#---------------------------------------------- 
-echo '(x.4)build'
-cd $basePath/Publish/DevOps/build-bash; bash startup.bash;
-
-
-#---------------------------------------------- 
-echo '(x.5)release-bash'
-cd $basePath/Publish/DevOps/release-bash; bash startup.bash;
- 
-
-
-
-#----------------------------------------------
-#(x.9)
-#cd $curPath

+ 2 - 2
Publish/DevOps/release-bash/71.file-zip.sh

@@ -7,7 +7,7 @@ args_="
 
 export basePath=/root/temp/svn
 
-export version=`grep '<Version>' $(grep '<pack>\|<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
+export appVersion=1.0
 
 export APPNAME=xxxxxx
 
@@ -28,7 +28,7 @@ for dirname in \`ls /root/code/Publish/release/release\`
 do
   if [ -d \$releasePath/release/\$dirname ]
   then
-    filezip zip -p -i \$releasePath/release/\$dirname -o \$releasePath/release-zip/${APPNAME}-\${dirname}-${version}.zip 
+    filezip zip -p -i \$releasePath/release/\$dirname -o \$releasePath/release-zip/${APPNAME}-\${dirname}-${appVersion}.zip 
   fi
 done
 

+ 1 - 1
Publish/DevOps/release-bash/72.nuget-push.sh

@@ -27,7 +27,7 @@ bash -c "
 for file in /root/code/$nugetPath/*.nupkg
 do
     echo nuget push \$file
-    dotnet nuget push \$file -k ${NUGET_KEY} -s ${NUGET_SERVER}
+    dotnet nuget push \$file -k ${NUGET_KEY} -s ${NUGET_SERVER} --skip-duplicate
 done
 " || true
 

+ 16 - 15
Publish/DevOps/release-bash/73.docker-image-build-push.sh

@@ -7,7 +7,7 @@ args_="
 
 export basePath=/root/temp/svn
 
-export version=`grep '<Version>' $(grep '<pack>\|<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
+export appVersion=1.0
 
 export DOCKER_SERVER=
 export DOCKER_USERNAME=serset
@@ -19,40 +19,40 @@ export DOCKER_PASSWORD=xxx
 
 
 #---------------------------------------------------------------------
-echo "(x.2)docker - init buildx"
+echo "73.docker-image-build-push.sh -> #1 docker - init buildx"
 
 
-export builderName="mybuilder-$version"
+export builderName="mybuilder__${appVersion}__"
 echo "builderName: $builderName"
 
-echo "开启实验特性"
+echo "#1.1 开启实验特性"
 export DOCKER_CLI_EXPERIMENTAL=enabled
 
-echo "验证是否开启"
+echo "#1.2 验证是否开启"
 docker buildx version
 
-echo "启用binfmt_misc"
+echo "#1.3 启用binfmt_misc"
 docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
 
-echo "验证binfmt_misc是否开启"
+echo "#1.4 验证binfmt_misc是否开启"
 ls -al /proc/sys/fs/binfmt_misc/
 
 
-echo "创建构建器"
+echo "#1.5 创建构建器"
 if [ ! "$(docker buildx ls | grep $builderName)" ]; then docker buildx create --use --name $builderName --buildkitd-flags '--allow-insecure-entitlement security.insecure'; fi
 
-echo "启动构建器"
+echo "#1.6 启动构建器"
 docker buildx inspect $builderName --bootstrap
 
-echo "查看当前使用的构建器及构建器支持的CPU架构"
+echo "#1.7 查看当前使用的构建器及构建器支持的CPU架构"
 docker buildx ls
 
 
 
 #---------------------------------------------------------------------
-echo "(x.3)docker - build and push"
+echo "73.docker-image-build-push.sh -> #2 docker - build and push"
 
-# login if UserName is not empty
+echo "#2.1 login if UserName is not empty"
 if [ -n "$DOCKER_USERNAME" ]; then docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD; fi
 
 dockerPath=$basePath/Publish/release/release/docker-image
@@ -64,12 +64,13 @@ do
     platform="linux/amd64,linux/arm64,linux/arm/v7"
     if [ -f "$dockerPath/$dockerName/Dockerfile.platform" ]; then platform=`cat "$dockerPath/$dockerName/Dockerfile.platform"`; fi
 
-    echo "docker build $dockerName, platform: $platform"
-    docker buildx build $dockerPath/$dockerName -t $DOCKER_SERVER/$dockerName:$version -t $DOCKER_SERVER/$dockerName --platform=$platform --push  --output=type=registry,registry.insecure=true --builder $builderName
+    echo "#2.* docker build $dockerName, platform: $platform"
+    echo "docker buildx build $dockerPath/$dockerName -t $DOCKER_SERVER/$dockerName:$appVersion -t $DOCKER_SERVER/$dockerName --platform=$platform --push  --output=type=registry,registry.insecure=true --builder $builderName"
+    docker buildx build $dockerPath/$dockerName -t $DOCKER_SERVER/$dockerName:$appVersion -t $DOCKER_SERVER/$dockerName --platform=$platform --push  --output=type=registry,registry.insecure=true --builder $builderName
   fi
 done
 
 
 #---------------------------------------------------------------------
-echo "(x.4)docker - remove buildx"
+echo "73.docker-image-build-push.sh -> #3 docker - remove buildx"
 if [ "$(docker buildx ls | grep $builderName)" ]; then docker buildx rm $builderName; fi

+ 6 - 6
Publish/DevOps/release-bash/startup.bash

@@ -30,9 +30,9 @@ cd $curPath
 
 
 #----------------------------------------------
-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
+echo "(x.3)get appVersion"
+export appVersion=`grep '<Version>' $(find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \; | head -n 1) | grep -oE '\>(.*)\<' | tr -d '<>/'`
+echo appVersion: $appVersion
 
 
 
@@ -44,9 +44,9 @@ echo $version
 
 for file in *.sh
 do
-    echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    echo "[$(date "+%H:%M:%S")]" bash $file
-    bash $file
+    echo "\n\n\n\n\n-----------------------------------------------------------------"
+    echo "[$(date "+%H:%M:%S")] sh $file"
+    sh $file
 done