|
@@ -26,8 +26,11 @@ cd $curPath
|
|
|
|
|
|
|
|
|
#----------------------------------------------
|
|
|
-echo "#1 get appVersion"
|
|
|
-export appVersion=`grep '<Version>' $(find ${basePath} -name *.csproj -exec grep '<appVersion>' -l {} \; | head -n 1) | grep -oE '\>(.*)\<' | tr -d '<>/'`
|
|
|
+echo "#1 get appVersion"
|
|
|
+# get csproj file with appVersion tag, if not exist get file with pack or publish tag
|
|
|
+csprojPath=$(find ${basePath} -name *.csproj -exec grep '<appVersion>' -l {} \; | head -n 1);
|
|
|
+if [ ! -f "$csprojPath" ]; then csprojPath=$(find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \; | head -n 1); fi
|
|
|
+if [ -f "$csprojPath" ]; then export appVersion=`grep '<Version>' "$csprojPath" | grep -oE '\>(.*)\<' | tr -d '<>/'`; fi
|
|
|
echo "appVersion from csproj: $appVersion"
|
|
|
|
|
|
# get v1 v2 v3
|