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.
pull/5340/head
Rene Cannao 3 months ago
parent 79756e78d7
commit 432cdfe499

@ -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:

Loading…
Cancel
Save