On Mon, Aug 03, 2015 at 01:45:47PM -0700, Jason Gerecke wrote: > 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.
heh, funny. for me it's the other way round, I only tag once distcheck etc. all passes :) and adding the version number automatically runs autogen. the release.sh script comes from the xorg one which has seen a fair number of changes since we forked it. it now checks for the top commit to have a tag and (iirc) whether the version number was bumped too. may be worth synching with the xorg one. > 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])), does this need to be added to EXTRA_DIST? also, will this work with builddir != srcdir if you have the path in there? (if distcheck passes, then the answer is yes, so ignore this comment :) > [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 && you don't need this test, git describe will fail if it can't find a git directory anyway > + 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 I did not know that you could put case/esac into a test condition. learned something new there, thanks > +then > + VN=$(echo "$VN" | sed -e "s/${TAG_PREFIX}//"); > + #VN=$(echo "$VN" | sed -e 's/-/./g'); drop this line? > +elif test -f version > +then > + VN=$(cat version) || VN="$DEF_VER" wait, what generates the "version" file? am I missing something here? > +else > + VN="$DEF_VER" > +fi > + > +VN=$(expr "$VN" : v*'\(.*\)') > + > +echo $VN can we rename VN to VERSION? would be a lot more obvious to grasp and characters are not at a premium anymore now that we have terabyte harddrives :) Cheers, Peter > -- > 2.4.6 > > ------------------------------------------------------------------------------ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel