Explorar el Código

Ensure there is a value even if not working within a git repo

Christopher Browne hace 9 años
padre
commit
90d0576355
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Makefile

+ 1 - 1
Makefile

@@ -114,7 +114,7 @@ include $(TMK_PATH)/protocol/lufa.mk
 include $(TMK_PATH)/common.mk
 include $(TMK_PATH)/rules.mk
 
-GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null)
+GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S")
 BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
 OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
 OPT_DEFS += -DQMK_VERSION=\"$(GIT_VERSION)\" -DQMK_BUILDDATE=\"$(BUILD_DATE)\"