]> Git [git.vados.ru] :: Repos - Mikrotiks/Mikrotiks.git/commitdiff
makefile: remove /dev/null redirections in git metadata vars
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Wed, 15 Apr 2026 11:56:52 +0000 (14:56 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Wed, 15 Apr 2026 11:56:52 +0000 (14:56 +0300)
Makefile

index 49bd3bb1d69e19d7a427f1a61be77af7dd707d75..ff4cf7cd37d1bc331fa86a8b202dd7516615f7c9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,12 +12,12 @@ SHELL := /bin/bash
 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))