Browse files

Capture the version during "make dist".

  • Loading branch information...
1 parent 17dc069 commit 50afa5636de78693739ccaefae4f19f43e154983 @kr committed Nov 24, 2008
Showing with 8 additions and 1 deletion.
  1. +3 −0 Makefile.am
  2. +1 −1 configure.in
  3. +4 −0 version.sh
View
3 Makefile.am
@@ -55,3 +55,6 @@ clean:
rm -f $(program) .*.d core core.* gmon.out
rm -f $(program)-*.tar.gz
+dist-hook:
+ echo -e '#!/bin/sh\n\n# This file was generated by "make dist".\necho $(VERSION)' > $(distdir)/version.sh
+ chmod +x $(distdir)/version.sh
View
2 configure.in
@@ -5,7 +5,7 @@ AC_INIT
AC_CONFIG_SRCDIR([README])
AC_CONFIG_SRCDIR(job.c)
AC_CONFIG_HEADERS(config.h)
-BEAN_VERSION="$(git describe | sed 's/^v//')"
+BEAN_VERSION="$(./version.sh)"
AM_INIT_AUTOMAKE(beanstalkd,$BEAN_VERSION)
AM_MAINTAINER_MODE
View
4 version.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# This file will be replaced by "make dist".
+git describe | sed 's/^v//'

0 comments on commit 50afa56

Please sign in to comment.