From a93031d5e0932bef1d26b8acad3482115424b4e6 Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Sat, 6 Jan 2024 12:02:44 +0530 Subject: [PATCH] Make Makefile accept custom build versions from env for dev builds. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2686438f..e223cd4a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ LAST_COMMIT := $(or $(shell git rev-parse --short HEAD 2> /dev/null),$(shell head -n 1 VERSION | grep -oP -m 1 "^[a-z0-9]+$$"),"") # Try to get the semver from 1) git 2) the VERSION file 3) fallback. -VERSION := $(or $(shell git describe --tags --abbrev=0 2> /dev/null),$(shell grep -oP 'tag: \Kv\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?' VERSION),"v0.0.0") +VERSION := $(or $(LISTMONK_VERSION),$(shell git describe --tags --abbrev=0 2> /dev/null),$(shell grep -oP 'tag: \Kv\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?' VERSION),"v0.0.0") BUILDSTR := ${VERSION} (\#${LAST_COMMIT} $(shell date -u +"%Y-%m-%dT%H:%M:%S%z"))