From 63068f9b8f1084d859ab35d454eaa3e74fb3e227 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 16 Feb 2026 16:44:33 +0100 Subject: [PATCH] count relative to version tag, and ignore non existing --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 78066b2e0..9451e1a6c 100644 --- a/Makefile +++ b/Makefile @@ -165,7 +165,7 @@ YOSYS_VER := 0.62 ifneq (, $(shell command -v git 2>/dev/null)) ifneq (, $(shell git rev-parse --git-dir 2>/dev/null)) - GIT_COMMIT_COUNT := $(shell git rev-list --count $(shell git describe --tags --abbrev=0)..HEAD 2>/dev/null) + GIT_COMMIT_COUNT := $(or $(shell git rev-list --count v$(YOSYS_VER)..HEAD 2>/dev/null),0) ifneq ($(GIT_COMMIT_COUNT),0) YOSYS_VER := $(YOSYS_VER)+$(GIT_COMMIT_COUNT) endif