Lith hace 8 meses
padre
commit
57602d53ed

+ 4 - 2
Publish/DevOps3/build-bash/10.Test.bash

@@ -36,8 +36,10 @@ serset/dotnet:sdk-6.0 \
 bash -c "
 set -e
 
+cd /root/code
+
 #2.1 skip if no test projects
-if grep '<test>' -r --include *.csproj /root/code; then
+if grep '<test>' -r --include *.csproj; then
 	echo '#10.Test.bash -> got projects need to test'
 else
 	echo '#10.Test.bash -> skip for no project needs to test'
@@ -46,7 +48,7 @@ fi
 
 #2.2 run test
 echo '#10.Test.bash -> #2.2 run test...'
-for file in \$(grep -a '<test>' . -rl --include *.csproj /root/code)
+for file in \$(grep -a '<test>' . -rl --include *.csproj)
 do
 	echo '#10.Test.bash -> #2.2.1 run test:'
 	echo run test for project \"\$file\"

+ 5 - 3
Publish/DevOps3/build-bash/40.Station-publish.sh

@@ -27,7 +27,9 @@ serset/dotnet:sdk-6.0 \
 bash -c "
 set -e
 
-if grep '<publish>' -r --include *.csproj /root/code; then
+cd /root/code
+
+if grep '<publish>' -r --include *.csproj; then
 	echo '#40.Station-publish.sh -> got projects need to be built'
 else
 	echo '#40.Station-publish.sh -> skip for no project needs to be built'
@@ -35,7 +37,7 @@ else
 fi
 
 echo '#1 get netVersion'
-export netVersion=\$(grep '<TargetFramework>' \$(grep '<publish>' -rl --include *.csproj /root/code | head -n 1) | grep -oP '>(.*)<' | tr -d '<>')
+export netVersion=\$(grep '<TargetFramework>' \$(grep '<publish>' -rl --include *.csproj | head -n 1) | grep -oP '>(.*)<' | tr -d '<>')
 echo netVersion: \$netVersion
 
 
@@ -43,7 +45,7 @@ export publishPath=/root/code/Publish/release/release/Station\(\$netVersion\)
 mkdir -p \$publishPath
 
 echo '#2 publish station'
-for file in \$(grep -a '<publish>' . -rl --include *.csproj /root/code)
+for file in \$(grep -a '<publish>' . -rl --include *.csproj)
 do	
 	# get publishName
 	cd /root/code