Restrict git describe to tags matching v* 01/6401/1 BUILD_v4.0.1_2
authorMichael Marchetti <mmarchetti@sandvine.com>
Fri, 3 Aug 2018 13:19:25 +0000 (15:19 +0200)
committerMichael Marchetti <mmarchetti@sandvine.com>
Fri, 3 Aug 2018 13:24:52 +0000 (15:24 +0200)
Signed-off-by: Michael Marchetti <mmarchetti@sandvine.com>
Makefile
setup.py
setup_lite.py

index 553d349..95d8970 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,9 +24,9 @@ clean_build:
 prepare_lite:
        #pip install --user --upgrade setuptools
        mkdir -p build
-       #VER1=$(shell git describe | sed -e 's/^v//' |cut -d- -f1); \
-       #VER2=$(shell git describe | cut -d- -f2); \
-       #VER3=$(shell git describe | cut -d- -f3); \
+       #VER1=$(shell git describe --match v*| sed -e 's/^v//' |cut -d- -f1); \
+       #VER2=$(shell git describe --match v*| cut -d- -f2); \
+       #VER3=$(shell git describe --match v*| cut -d- -f3); \
        #echo "$$VER1.dev$$VER2+$$VER3" > build/OVIM_VERSION
        cp tox.ini build/
        cp MANIFEST.in build/
@@ -52,9 +52,9 @@ prepare_lite:
 prepare:
        #pip install --user --upgrade setuptools
        mkdir -p build
-       #VER1=$(shell git describe | sed -e 's/^v//' |cut -d- -f1); \
-       #VER2=$(shell git describe | cut -d- -f2); \
-       #VER3=$(shell git describe | cut -d- -f3); \
+       #VER1=$(shell git describe --match v*| sed -e 's/^v//' |cut -d- -f1); \
+       #VER2=$(shell git describe --match v*| cut -d- -f2); \
+       #VER3=$(shell git describe --match v*| cut -d- -f3); \
        #echo "$$VER1.dev$$VER2+$$VER3" > build/OPENVIM_VERSION
        cp tox.ini build/
        cp MANIFEST.in build/
index 4d4073a..28865c1 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,7 @@ __scripts__ = ['openflow',
                'osm_openvim/scripts/get_dhcp_lease.sh']
 
 setup(name=__name,
-      version_command=('git describe', 'pep440-git'),
+      version_command=('git describe --match v*', 'pep440-git'),
       description=__description,
       long_description=__description,
       author=__author,
index 7bb1c79..23d224c 100755 (executable)
@@ -41,7 +41,7 @@ _req = [
 __scripts__ = ['openflow-lib']
 
 setup(name=__name,
-      version_command=('git describe', 'pep440-git'),
+      version_command=('git describe --match v*', 'pep440-git'),
       description=__description,
       long_description=__description,
       author=__author,