include ../.config/config.mk
COMM_TAG := $(shell git rev-list --abbrev-commit --tags --max-count=1)
-# `2>/dev/null` suppress errors and `|| true` suppress the error codes.
-TAG := $(shell git describe --abbrev=0 --tags ${COMM_TAG} 2>/dev/null || true)
+# Keep non-fatal behavior without relying on /dev/null permissions.
+TAG := $(shell git describe --abbrev=0 --tags ${COMM_TAG} || true)
# here we strip the version prefix
TAG_VERS :=$(TAG:v%=%)
# get the latest commit hash in the short form
-COMM_HASH := $(shell git rev-parse --short=8 HEAD 2>/dev/null) # Get short commit hash
+COMM_HASH := $(shell git rev-parse --short=8 HEAD || true) # Get short commit hash
#COMMIT := $(shell git rev-parse --short HEAD)
# get the latest commit date in the form of YYYYmmddHHMM ($(DTSTAMP_FMT))
COMM_DATE := $(shell git log -1 --format=%cd --date=format:$(DTSTAMP_FMT))