Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.")