Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-16 10:59:15 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-16 11:15:18 (GMT)
commite95069f9c2ed0e9b8a54f253c3582ee2db1d8a15 (patch)
tree774bf128f64d2440064e767bda34dd3b6139b047
parent1751af13fafcaaf96c94b4e834e8ece36bf0a5f9 (diff)
Use git to figure out the version numberv0.1
-rw-r--r--configure.ac2
-rwxr-xr-xversion12
2 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3bc327c..05bafa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([sugar-runner], [0.1], [dwnarvaez@gmail.com])
+AC_INIT([sugar-runner], m4_esyscmd([./version]), [dwnarvaez@gmail.com])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/version b/version
new file mode 100755
index 0000000..8ab42cb
--- /dev/null
+++ b/version
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+import re
+import subprocess
+import sys
+
+description = subprocess.check_output(["git", "describe"])
+match = re.match(r"v([\d\.]+)", description)
+if match:
+ sys.stdout.write(match.groups()[0])
+else:
+ raise Exception("Unknown version. Please create an annotated tag.")