From 8424d88eac0bd90acf6aa2681501b04dd9f6c33e 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 4c43db2d7f..2d97d6e448 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):