summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dummer <martin.dummer@gmx.net>2012-10-08 08:09:19 +0200
committerMartin Dummer <martin.dummer@gmx.net>2012-10-08 08:09:19 +0200
commit2316873951d518aa311f132537b4c72168289ef8 (patch)
treee2070f77413b0959ff276adefccd590ca5ca26e0
parent76f2d982cadb1efed6c13e72e849d86019bac265 (diff)
downloadvdr-plugin-undelete-2316873951d518aa311f132537b4c72168289ef8.tar.gz
vdr-plugin-undelete-2316873951d518aa311f132537b4c72168289ef8.tar.bz2
change plugin version string to include GIT version
-rw-r--r--Makefile5
-rw-r--r--undelete.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ac3c2a2..2cb0070 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ PLUGIN = undelete
### 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:
@@ -78,6 +79,10 @@ ifeq ($(shell test $(VDRVERSNUM) -lt 10308 ; echo $$?),0)
OBJS += menutext.o
endif
+ifneq ($(strip $(GITTAG)),)
+DEFINES += -DGITVERSION='"-GIT-$(GITTAG)"'
+endif
+
### Implicit rules:
%.o: %.c
diff --git a/undelete.c b/undelete.c
index ce3c2d8..83ec3db 100644
--- a/undelete.c
+++ b/undelete.c
@@ -15,7 +15,11 @@
#include <vdr/recording.h>
#include <vdr/videodir.h>
-static const char *VERSION = "0.0.7";
+#ifndef GITVERSION
+#define GITVERSION ""
+#endif
+
+static const char VERSION[] = "0.0.7" GITVERSION;
static const char DESCRIPTION[] = trNOOP("undelete for recordings");