From 58a66a222d6d8d95f91cadde35e954b13d50ea27 Mon Sep 17 00:00:00 2001 From: Tyler Rockwood Date: Wed, 1 Nov 2023 21:41:21 -0500 Subject: [PATCH] cmake: exclude operator tags when determining version We recently added a new `operator/*` tags in git, and we shouldn't be picking that up to determine Redpanda version. Signed-off-by: Tyler Rockwood --- src/v/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v/CMakeLists.txt b/src/v/CMakeLists.txt index 98dd4ef1f7f46..bbb2f998e0d2d 100644 --- a/src/v/CMakeLists.txt +++ b/src/v/CMakeLists.txt @@ -113,10 +113,10 @@ option(ENABLE_GIT_HASH "Build with Git hash in metadata" OFF) if(${ENABLE_GIT_VERSION}) include(GetGitRevisionDescription) if(${ENABLE_GIT_HASH}) - git_describe(GIT_VER --always) + git_describe(GIT_VER --always --exclude=operator/*) else() # If displaying a version, make sure it also doesn't display a hash. - git_describe(GIT_VER --always --abbrev=0) + git_describe(GIT_VER --always --abbrev=0 --exclude=operator/*) endif() else() if(${ENABLE_GIT_HASH})