From 44e5c4dab5eb384b87da3b75d7619d4100246f68 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Sun, 13 Oct 2013 14:04:25 +0200 Subject: Added revision number to version (closes #1361) --- Makefile | 3 ++- version.dist | 13 +++++++++++++ version.h | 13 ------------- 3 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 version.dist delete mode 100644 version.h diff --git a/Makefile b/Makefile index 2e8fbf0..d89b038 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ DIRS = command plugin +$(shell GITVERSION=`git rev-parse --short HEAD`; if [ -n $GITVERSION ]; then sed "s/\";/ ($$GITVERSION)\";/" version.dist > version.h; else cp version.dist version.h; fi) VERSION = $(shell grep 'static const char \*VERSION *=' version.h | awk '{ print $$6 }' | sed -e 's/[";]//g') TMPDIR = /tmp @@ -40,4 +41,4 @@ dist: clean: for i in $(DIRS); do make -C $$i clean; done - @-rm -f $(PACKAGE).tgz + @-rm -f version.h $(PACKAGE).tgz diff --git a/version.dist b/version.dist new file mode 100644 index 0000000..8a6a088 --- /dev/null +++ b/version.dist @@ -0,0 +1,13 @@ +/* + * version.h: A plugin/program for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + */ + +#ifndef __version_h_ +#define __version_h_ + +static const char *VERSION = "0.1.5pre"; + +#endif diff --git a/version.h b/version.h deleted file mode 100644 index 8a6a088..0000000 --- a/version.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * version.h: A plugin/program for the Video Disk Recorder - * - * See the README file for copyright information and how to reach the author. - * - */ - -#ifndef __version_h_ -#define __version_h_ - -static const char *VERSION = "0.1.5pre"; - -#endif -- cgit v1.2.3