From fc563d3f6ef76fbbaf2467cae3c0671274badded Mon Sep 17 00:00:00 2001 From: Kevin Pollet Date: Mon, 7 Oct 2024 09:32:05 +0200 Subject: [PATCH] Fix the resolved TAG_NAME for commit in multiple tags --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9204814ab..af62ff77c 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,10 @@ SRCS = $(shell git ls-files '*.go' | grep -v '^vendor/') -TAG_NAME := $(shell git tag -l --contains HEAD) +TAG_NAME := $(shell git describe --abbrev=0 --tags --exact-match) SHA := $(shell git rev-parse HEAD) VERSION_GIT := $(if $(TAG_NAME),$(TAG_NAME),$(SHA)) VERSION := $(if $(VERSION),$(VERSION),$(VERSION_GIT)) -GIT_BRANCH := $(subst heads/,,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)) - -REPONAME := $(shell echo $(REPO) | tr '[:upper:]' '[:lower:]') BIN_NAME := traefik CODENAME ?= cheddar