From 432cdfe49952a1f255eaa157a5d339cabe54e150 Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Tue, 3 Feb 2026 21:24:38 +0000 Subject: [PATCH] Modify Makefile to increment major version when PROXYSQLGENAI is enabled When PROXYSQLGENAI=1 is set, the major version number in GIT_VERSION is incremented by 1. For example: - 3.0.6-386-g79756e7 becomes 4.0.6-386-g79756e7 - 2.7.1-123-abc1234 becomes 3.7.1-123-abc1234 This allows distinguishing GenAI-enabled builds from standard builds through the version string. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 930d31f53..7d0454ad5 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,12 @@ GIT_VERSION ?= $(shell git describe --long --abbrev=7 2>/dev/null || git describ ifndef GIT_VERSION $(error GIT_VERSION is not set) endif + +# If PROXYSQLGENAI is enabled, increment the major version number by 1 +ifeq ($(PROXYSQLGENAI),1) + GIT_VERSION := $(shell echo "$(GIT_VERSION)" | awk -F. '{printf "%d.%s", $$1+1, substr($$0, length($$1)+2)}') +endif + export GIT_VERSION ### NOTES: