From 584c3bd2aa1e88d2c68c326b5be565cbf7303348 Mon Sep 17 00:00:00 2001 From: Vivek R Date: Sat, 3 Oct 2020 03:44:13 +0530 Subject: [PATCH] fix: incorrect git tag being injected as version Git tag version injected via Makefile is incorrect since `git describe` doesn't consider annotated tags but all the recent releases are lightweight tags. So instead use `git describe --tags` command which also considers recent lightweight tag. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c5dd205..856173f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ LAST_COMMIT := $(shell git rev-parse --short HEAD) LAST_COMMIT_DATE := $(shell git show -s --format=%ci ${LAST_COMMIT}) -VERSION := $(shell git describe) +VERSION := $(shell git describe --tags) BUILDSTR := ${VERSION} (${LAST_COMMIT} $(shell date -u +"%Y-%m-%dT%H:%M:%S%z")) BIN := listmonk