File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88export codePath=/root/temp/svn
99
1010
11- export version=` grep ' <Version>' ${codePath} -r --include * .csproj | grep -oP ' >(.*)<' | tr -d ' <>' `
11+ export version=` grep ' <Version>' $( grep ' <pack/>\|<publish> ' $ {codePath} -r --include * .csproj -l | head -n 1 ) | grep -oP ' >(.*)<' | tr -d ' <>' `
1212
1313
1414
Original file line number Diff line number Diff line change 77
88export codePath=/root/temp/svn
99
10- export version=` grep ' <Version>' " ${codePath} " -r --include Sers.Core.csproj | grep -oP ' >(.*)<' | tr -d ' <>' `
11-
1210
1311# "
1412
Original file line number Diff line number Diff line change 77
88export codePath=/root/temp/svn
99
10- export version=` grep ' <Version>' ${codePath} -r --include * .csproj | grep -oP ' >(.*)<' | tr -d ' <>' `
10+ export version=` grep ' <Version>' $( grep ' <pack/>\|<publish> ' $ {codePath} -r --include * .csproj -l | head -n 1 ) | grep -oP ' >(.*)<' | tr -d ' <>' `
1111
1212export DOCKER_USERNAME=serset
1313export DOCKER_PASSWORD=xxx
Original file line number Diff line number Diff line change 77
88export codePath=/root/temp/svn
99
10- export version=` grep ' <Version>' ${codePath} -r --include * .csproj | grep -oP ' >(.*)<' | tr -d ' <>' `
10+ export version=` grep ' <Version>' $( grep ' <pack/>\|<publish> ' $ {codePath} -r --include * .csproj -l | head -n 1 ) | grep -oP ' >(.*)<' | tr -d ' <>' `
1111
1212export name=filezip
1313
Original file line number Diff line number Diff line change 77
88export codePath=/root/temp/svn
99
10- export version=` grep ' <Version>' ${codePath} -r --include * .csproj | grep -oP ' >(.*)<' | tr -d ' <>' `
10+ export version=` grep ' <Version>' $( grep ' <pack/>\|<publish> ' $ {codePath} -r --include * .csproj -l | head -n 1 ) | grep -oP ' >(.*)<' | tr -d ' <>' `
1111
1212export name=filezip
1313
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ cd $curWorkDir
1414# export codePath=/root/temp/svn
1515
1616export name=filezip
17- export projectPath=FileZip
1817
1918# export DOCKER_USERNAME=serset
2019# export DOCKER_PASSWORD=xxx
@@ -31,7 +30,7 @@ export projectPath=FileZip
3130
3231# ----------------------------------------------
3332echo " (x.2)get version"
34- export version=` grep ' <Version>' ${codePath} -r --include * .csproj | grep -oP ' >(.*)<' | tr -d ' <>' `
33+ export version=` grep ' <Version>' $( grep ' <pack/>\|<publish> ' $ {codePath} -r --include * .csproj -l | head -n 1 ) | grep -oP ' >(.*)<' | tr -d ' <>' `
3534# echo $version
3635
3736
You can’t perform that action at this time.
0 commit comments