Skip to content

Commit

Permalink
Add version.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
angt committed Dec 7, 2015
1 parent 9dda940 commit 09cd749
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -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])
Expand Down
9 changes: 9 additions & 0 deletions version.sh
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 09cd749

Please sign in to comment.