From fe78c9da79f4de5379ff50921ac7648eba96f2f0 Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Tue, 9 Jan 2024 10:49:28 +0200 Subject: [PATCH] fix previous release detection in make release-notes We're overlapping our version numbers with really old version numbers, ie. capm3-v0.4.1 vs v0.4.1 when using grep without line-start ^. Fix the issue, so the correct previous tag is used in release automation. Signed-off-by: Tuomo Tanskanen --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7d357eec3e..3d162b641d 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,7 @@ mod: ## Clean up go module settings ## Release ## -------------------------------------- RELEASE_TAG ?= $(shell git describe --abbrev=0 2>/dev/null) -PREVIOUS_TAG ?= $(shell git tag -l | grep -B 1 $(RELEASE_TAG) | head -n 1) +PREVIOUS_TAG ?= $(shell git tag -l | grep -B 1 "^$(RELEASE_TAG)" | head -n 1) RELEASE_NOTES_DIR := releasenotes $(RELEASE_NOTES_DIR):