aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/version
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-04-18 15:26:39 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-04-19 20:16:14 +0000
commitc06eeb0e3c9c1a9fa8f913e2d785b03220bfdabd (patch)
tree7ce8ea3eb0aa68f102922868c08470ecb2515c97 /src/scripts/version
parentb59a7055524bae29a328958c493d0b600776dc27 (diff)
Fix "make dist" to include version number, docouple it from rpm packaging
Change-Id: If2f9976d668089026c97b897cf449bff09050631 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/scripts/version')
-rwxr-xr-xsrc/scripts/version12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/scripts/version b/src/scripts/version
index d92eb8b70fc..d8728a9f6a8 100755
--- a/src/scripts/version
+++ b/src/scripts/version
@@ -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