]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/version.c.SH
roll version to 1.8.1 for conversion to git repository
[irc/evilnet/x3.git] / src / version.c.SH
index 8be88df58226323ff129325a25770137441d2e38..f3b3a15ef4b53cc3d646679f49bc7fa9d3441ee2 100755 (executable)
@@ -1,14 +1,23 @@
 #! /bin/sh
 
+#TODO: we should tag our version changes, and use git describe instead of git log.
+
 echo "Extracting src/version.c ..."
 
-if test -f ../.release
-then
-        cvs_version=`cat ../.release`
+if [ -d ../.git ]; then
+    if [ -x `which git` ]; then
+        echo "Found git. version is"`git log -1 --pretty=oneline`
+        cvs_version="git:"`git log -1 --pretty=oneline`
+    else
+        echo "No git installed. unknown git revision"
+        cvs_version="unknown"
+    fi
 else
-        cvs_version=`hg tip --template '{rev}:{node|short} {date|shortdate}'`
+    echo "Not a git repository. leaving revision empty"
+    cvs_version="not git"
 fi
 
+
 /bin/cat >version.c <<!SUB!THIS!
 /* version.c - CVS Version specific information.
  * Copyright 2000-2004 srvx Development Team