aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorfrosty <gabriel@bwaaa.monster>2026-09-03 23:59:40 -0400
committerfrosty <gabriel@bwaaa.monster>2026-09-03 23:59:40 -0400
commitacdff2d3a2f9283db61f5bbc08a303c69635304f (patch)
treee3b417a7fe756c7c6de7cb77d41183af94834cec /Makefile
parent4a705bd1b88df6015af7a5635c5488957faac159 (diff)
parent892acdc7f26df93735e0098ce62159571b31eb02 (diff)
downloadomnisearch-acdff2d3a2f9283db61f5bbc08a303c69635304f.tar.gz
Merge branch 'master' into indev
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e57c991..af6b741 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,9 @@ GIT_HASH := $(shell git rev-parse --short HEAD)
GIT_DATE := $(shell git log -1 --format='%ad' --date='format:%y.%m.%d')
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GIT_REMOTE := $(shell git remote get-url origin)
+GIT_TAG := $(shell git describe --tags --exact-match HEAD 2>/dev/null)
-VERSION := $(GIT_DATE)+$(GIT_HASH)_$(GIT_BRANCH)
+VERSION := $(if $(GIT_TAG),$(GIT_TAG),$(GIT_DATE)+$(GIT_HASH)_$(GIT_BRANCH))
CFLAGS := -Wall -Wextra -O2 -Isrc -DVERSION='"$(VERSION)"' -DGIT_REMOTE='"$(GIT_REMOTE)"'