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 {