Ubuntu Pastebin

Paste from smoser at Fri, 20 Jan 2017 02:08:13 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/Makefile b/Makefile
index 5d35dcc..2126e44 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,7 @@ test: $(unittests)
 
 check_version:
 	@if [ "$(READ_VERSION)" != "$(CODE_VERSION)" ]; then \
-	    echo "Error: read-version version $(READ_VERSION)" \
+	    echo "Error: read-version version '$(READ_VERSION)'" \
 	    "not equal to code version $(CODE_VERSION)"; exit 2; \
 	    else true; fi
 
diff --git a/tools/read-version b/tools/read-version
index c10f9b4..7478d3b 100755
--- a/tools/read-version
+++ b/tools/read-version
@@ -56,7 +56,7 @@ if os.path.isdir(os.path.join(_tdir, ".git")) and which("git"):
     flags = []
     if use_tags:
         flags = ['--tags']
-    cmd = ['git', 'describe'] + flags
+    cmd = ['git', 'describe', '--match=[0-9].*'] + flags
 
     version = tiny_p(cmd).strip()
 
Download as text