From c98fe8ca87d5fcc51f1f942e6d4e885adeea4f98 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 26 Feb 2012 22:54:18 +0200 Subject: [PATCH] Added a GIT tag into the version string. --- Makefile | 5 +++++ femon.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf66864..b227656 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ PLUGIN = femon ### The version number of this plugin (taken from the main source file): VERSION = $(shell grep 'static const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') +GITTAG = $(shell git describe --always 2>/dev/null) ### The C++ compiler and options: @@ -59,6 +60,10 @@ ifdef FEMON_DEBUG DEFINES += -DDEBUG endif +ifneq ($(strip $(GITTAG)),) +DEFINES += -DGITVERSION='"-GIT-$(GITTAG)"' +endif + .PHONY: all all-redirect all-redirect: all diff --git a/femon.c b/femon.c index 7c34882..7cdff2b 100644 --- a/femon.c +++ b/femon.c @@ -18,7 +18,11 @@ #error "VDR-1.7.23 API version or greater is required!" #endif -static const char VERSION[] = "1.7.13"; +#ifndef GITVERSION +#define GITVERSION "" +#endif + +static const char VERSION[] = "1.7.13" GITVERSION; static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)"); static const char MAINMENUENTRY[] = trNOOP("Signal Information");