diff --git a/kernel-module/Makefile b/kernel-module/Makefile index 8a69d17c0..ef93bc80f 100644 --- a/kernel-module/Makefile +++ b/kernel-module/Makefile @@ -9,12 +9,12 @@ ifeq ($(RTPENGINE_VERSION),) ifneq ($(DPKG_PRSCHNGLG),) DPKG_PRSCHNGLG=$(shell dpkg-parsechangelog -l$(DEB_CHANGELOG) | awk '/^Version: / {print $$2}') endif - GIT_BR_COMMIT=git-$(shell cd $(M) && git rev-parse --abbrev-ref --symbolic-full-name HEAD)-$(shell cd $(M) && git rev-parse --short HEAD) + GIT_BR_COMMIT=git-$(shell cd $(M) && git rev-parse --abbrev-ref --symbolic-full-name HEAD 2> /dev/null)-$(shell cd $(M) && git rev-parse --short HEAD 2> /dev/null) ifneq ($(DPKG_PRSCHNGLG),) RTPENGINE_VERSION+=$(DPKG_PRSCHNGLG) endif - ifneq ($(GIT_BR_COMMIT),) + ifneq ($(GIT_BR_COMMIT),git--) RTPENGINE_VERSION+=$(GIT_BR_COMMIT) endif diff --git a/lib/lib.Makefile b/lib/lib.Makefile index 728a11aeb..2d9b8d883 100644 --- a/lib/lib.Makefile +++ b/lib/lib.Makefile @@ -10,12 +10,12 @@ ifeq ($(RTPENGINE_VERSION),) ifneq ($(DPKG_PRSCHNGLG),) DPKG_PRSCHNGLG=$(shell dpkg-parsechangelog -l$(RTPENGINE_ROOT_DIR)/debian/changelog | awk '/^Version: / {print $$2}') endif - GIT_BR_COMMIT=git-$(shell git rev-parse --abbrev-ref --symbolic-full-name HEAD)-$(shell git rev-parse --short HEAD) + GIT_BR_COMMIT=git-$(shell git rev-parse --abbrev-ref --symbolic-full-name HEAD 2> /dev/null)-$(shell git rev-parse --short HEAD 2> /dev/null) ifneq ($(DPKG_PRSCHNGLG),) RTPENGINE_VERSION+=$(DPKG_PRSCHNGLG) endif - ifneq ($(GIT_BR_COMMIT),) + ifneq ($(GIT_BR_COMMIT),git--) RTPENGINE_VERSION+=$(GIT_BR_COMMIT) endif