Get version from the git revision

This ensures to properly differntiate all the beta releases.
This commit is contained in:
Andrea Mazzoleni 2015-11-24 19:34:21 +01:00
parent bbebb8bf88
commit 1f2c0fcc22
3 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,8 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([snapraid], [9.1], [], [], [http://www.snapraid.it])
dnl Get version number from git
m4_define([git_revision], m4_esyscmd_s([git describe]))
AC_INIT([snapraid], [git_revision], [], [], [http://www.snapraid.it])
AM_INIT_AUTOMAKE([foreign no-dependencies subdir-objects])
AC_CONFIG_SRCDIR([cmdline/snapraid.c])
AC_CONFIG_HEADERS([config.h])

View file

@ -3,6 +3,9 @@
make distclean
# Reconfigure (with force) to get the latest revision from git
autoreconf -f
if ! ./configure.windows-x86; then
exit 1
fi

View file

@ -2,7 +2,6 @@
#
rm -r cov-int
rm snapraid.tgz
make distclean
@ -16,11 +15,11 @@ if ! cov-build --dir cov-int make; then
exit 1
fi
tar czf snapraid.tgz cov-int
REVISION=`git describe`
tar czf snapraid-$REVISION.tgz cov-int
rm -r cov-int
echo snapraid.tgz ready to upload to https://scan.coverity.com/projects/1986/builds/new
echo snapraid-$REVISION.tgz ready to upload to https://scan.coverity.com/projects/1986/builds/new