From b6d93bae205585c0e52108be80137fb02abc8da5 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 13 Nov 2018 00:23:00 +0100 Subject: [PATCH] configure.ac: get ver_micro directly from git repository Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d99d5d574b36ac1236fcfb61162e91fb1284d243 Author: vanhofen Date: 2018-11-13 (Tue, 13 Nov 2018) Origin message was: ------------------ - configure.ac: get ver_micro directly from git repository ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0ae9d739c..f332bad3e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,12 @@ +# Keep in sync with git tags! Set tag with 'git tag NI-3.60'. define(ver_major, 3) define(ver_minor, 60) -define(ver_micro, 0) +# ver_micro counts commits since last tag +define(ver_micro, m4_esyscmd([ + GITTAG=$(git tag -l "NI-*" | tail -n1); + GITREV=$(git rev-list $GITTAG..HEAD --count); + printf "$GITREV" +])) AC_INIT(NI-Neutrino, ver_major.ver_minor.ver_micro) AM_INIT_AUTOMAKE([nostdinc foreign])