From 88f41adea4bb56a237fbea0be15adbadaa34c576 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 8 Dec 2025 17:03:50 +0200 Subject: [PATCH] other: update version setting using git --- Makefile | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Makefile b/Makefile index e831173..65cca10 100644 --- a/Makefile +++ b/Makefile @@ -7,19 +7,7 @@ LOCALSTATEDIR ?= $(PREFIX)/var RUNSTATEDIR ?= $(LOCALSTATEDIR)/run GO ?= $(shell type -a -P go | head -n 1) -# Set version variable -ifeq ($(VERSION),) - COMMIT := $(shell git rev-parse --short HEAD) - TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1) - TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true) - VERSION := $(COMMIT) - ifeq ($(COMMIT), $(TAG_COMMIT)) - VERSION := $(TAG) - endif - ifneq ($(shell git status --porcelain),) - VERSION := $(VERSION)-dirty - endif -endif +VERSION ?= $(shell git describe --tags --dirty) build: mkdir -p build