P2P Ethernet
[vpp.git] / src / scripts / version
index af44728..d8728a9 100755 (executable)
@@ -4,16 +4,12 @@ path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )
 
 cd "$path"
 
-git rev-parse 2> /dev/null
-if [ $? == 0 ]; then
-    vstring=$(git describe)
-elif [ -f .version ]; then
+if [ -f .version ]; then
     vstring=$(cat .version)
 else
-    if [ -f ../rpm/*.gz ]; then
-        vstring=$(ls ../rpm/*.gz)
-    else
-        exit 1
+    vstring=$(git describe)
+    if [ $? != 0 ]; then
+      exit 1
     fi
 fi
 
@@ -50,5 +46,5 @@ fi
       echo ${TAG}-${ADD}${CMT:+~${CMT}}${BLD}
     fi
   else
-    echo ${TAG}
+    echo ${TAG}-release
 fi