One of the steps that must be completed prior to making a new release is bumping up the version number in configure.ac. This is an error-prone process which can be replaced by having configure.ac get the current version from our "git-version-gen" script. To make a release with this script in place, simply tag the final commit, run `./autogen.sh` to update the version numbers, run `make distcheck` to validate the build, perform any additional testing on the generated tarball, and finally use the "release.sh" script to push everything up to Sourceforge.
Signed-off-by: Jason Gerecke <jason.gere...@wacom.com> --- autogen.sh | 2 +- configure.ac | 2 +- git-version-gen | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 git-version-gen diff --git a/autogen.sh b/autogen.sh index 354f254..ddde471 100755 --- a/autogen.sh +++ b/autogen.sh @@ -6,7 +6,7 @@ test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir -autoreconf -v --install || exit 1 +autoreconf -v --install --force || exit 1 cd $ORIGDIR || exit $? $srcdir/configure "$@" diff --git a/configure.ac b/configure.ac index 6c8488e..b7b514e 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-wacom], - [0.30.0], + m4_normalize(m4_esyscmd([./git-version-gen])), [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-wacom]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/git-version-gen b/git-version-gen new file mode 100755 index 0000000..ca335e2 --- /dev/null +++ b/git-version-gen @@ -0,0 +1,32 @@ +#!/bin/sh + +DEF_VER=UNKNOWN +TAG_PREFIX="xf86-input-wacom-" +LF=' +' + +# First see if we're in a git directory and try git-describe, then +# try the 'version' file if present (included in release tarballs), +# and finally the default. +if test -d ${GIT_DIR:-.git} -o -f .git && + VN=$(git describe --match "${TAG_PREFIX}*" --abbrev=7 HEAD 2>/dev/null) && + case "$VN" in + *$LF*) (exit 1) ;; + ${TAG_PREFIX}*) + git update-index -q --refresh + test -z "$(git diff-index --name-only HEAD --)" || + VN="$VN-dirty" ;; + esac +then + VN=$(echo "$VN" | sed -e "s/${TAG_PREFIX}//"); + #VN=$(echo "$VN" | sed -e 's/-/./g'); +elif test -f version +then + VN=$(cat version) || VN="$DEF_VER" +else + VN="$DEF_VER" +fi + +VN=$(expr "$VN" : v*'\(.*\)') + +echo $VN -- 2.4.6 ------------------------------------------------------------------------------ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel