From a73921041f146575bb62cdaa7a190e222571c715 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 26 Feb 2012 22:54:45 +0200 Subject: [PATCH] Added a GIT tag into the version string. --- Makefile | 5 +++++ iptv.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 852566f..b49e1e7 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ PLUGIN = iptv ### The version number of this plugin (taken from the main source file): VERSION = $(shell grep 'const char VERSION\[\] *=' $(PLUGIN).c | awk '{ print $$5 }' | sed -e 's/[";]//g') +GITTAG = $(shell git describe --always 2>/dev/null) ### The C++ compiler and options: @@ -59,6 +60,10 @@ ifdef IPTV_DEBUG DEFINES += -DDEBUG endif +ifneq ($(strip $(GITTAG)),) +DEFINES += -DGITVERSION='"-GIT-$(GITTAG)"' +endif + .PHONY: all all-redirect all-redirect: all diff --git a/iptv.c b/iptv.c index 8b48467..773be42 100644 --- a/iptv.c +++ b/iptv.c @@ -16,7 +16,11 @@ #error "VDR-1.7.21 API version or greater is required!" #endif - const char VERSION[] = "0.5.0"; +#ifndef GITVERSION +#define GITVERSION "" +#endif + + const char VERSION[] = "0.5.0" GITVERSION; static const char DESCRIPTION[] = trNOOP("Experience the IPTV"); class cPluginIptv : public cPlugin {