From 1f2c0fcc2254f146a4405a9e10103174b7cd4c35 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 24 Nov 2015 19:34:21 +0100 Subject: [PATCH] Get version from the git revision This ensures to properly differntiate all the beta releases. --- configure.ac | 4 +++- makedist.sh | 3 +++ makescan.sh | 9 ++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index fe08234d..584540fd 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/makedist.sh b/makedist.sh index 84f0df9f..64179815 100755 --- a/makedist.sh +++ b/makedist.sh @@ -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 diff --git a/makescan.sh b/makescan.sh index 82bd8763..69d269a1 100755 --- a/makescan.sh +++ b/makescan.sh @@ -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