]> arthur.barton.de Git - netdata.git/commitdiff
Compute version from git
authorSimon Nagl <sin6332@thi.de>
Tue, 7 Feb 2017 16:02:05 +0000 (17:02 +0100)
committerSimon Nagl <simonnagl@aim.com>
Thu, 9 Feb 2017 09:00:00 +0000 (10:00 +0100)
configure.ac

index 0005ec551aa6e8f20a322ae217138888c2a1e572..16369b62ec01a2528c8dfcab3a496b3e0b7fad2c 100644 (file)
@@ -12,7 +12,10 @@ define([VERSION_SUFFIX], [_master])
 dnl Set to "1" for a first RPM release of a new version
 PACKAGE_RPM_RELEASE="0.0.$(echo VERSION_SUFFIX | sed s/^_//)"
 
-AC_INIT([netdata], VERSION_NUMBER[]VERSION_SUFFIX)
+define([VERSION_STRING], m4_esyscmd_s(git describe 2> /dev/null))
+m4_ifval(VERSION_STRING, [], [define([VERSION_STRING], VERSION_NUMBER[]VERSION_SUFFIX)])
+
+AC_INIT([netdata], VERSION_STRING)
 
 AM_MAINTAINER_MODE([disable])
 if test x"$USE_MAINTAINER_MODE" = xyes; then