Split build date into a separate DEFINE
This commit is contained in:
parent
4e1bc2d298
commit
bb0e0c7eba
6
Makefile
6
Makefile
@ -114,7 +114,7 @@ include $(TMK_PATH)/protocol/lufa.mk
|
|||||||
include $(TMK_PATH)/common.mk
|
include $(TMK_PATH)/common.mk
|
||||||
include $(TMK_PATH)/rules.mk
|
include $(TMK_PATH)/rules.mk
|
||||||
|
|
||||||
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d")
|
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null)
|
||||||
|
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
|
||||||
OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
OPT_DEFS += -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\"
|
||||||
OPT_DEFS += -DQMK_VERSION=\"$(GIT_VERSION)\"
|
OPT_DEFS += -DQMK_VERSION=\"$(GIT_VERSION)\" -DQMK_BUILDDATE=\"$(BUILD_DATE)\"
|
||||||
|
@ -138,7 +138,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|||||||
break;
|
break;
|
||||||
case M_VERSION:
|
case M_VERSION:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION);
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION "@" QMK_BUILDDATE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case M_RANDDIGIT:
|
case M_RANDDIGIT:
|
||||||
|
Loading…
Reference in New Issue
Block a user