Add version.sh

This commit is contained in:
angt
2015-12-08 00:38:52 +01:00
parent 9dda940928
commit 09cd749107
2 changed files with 14 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
AC_PREREQ([2.65])
AC_INIT([glorytun], [0.0.12], [https://github.com/angt/glorytun/issues],
[glorytun], [https://github.com/angt/glorytun])
AC_INIT([glorytun],
[m4_esyscmd([./version.sh])],
[https://github.com/angt/glorytun/issues],
[glorytun],
[https://github.com/angt/glorytun])
AC_CONFIG_SRCDIR([src/common.h])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.9 -Wall -Werror foreign tar-ustar subdir-objects])

9
version.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
[ -z "${VERSION}" ] && VERSION=`git describe --tags --always 2>/dev/null` \
&& VERSION=${VERSION#v}
[ -z "${VERSION}" ] && VERSION=`basename \`pwd\`` \
&& VERSION=${VERSION#*-}
echo -n ${VERSION}