From cdfc2b8715a9fc4357c8b48b94351dc1a00bb527 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Fri, 3 Dec 2021 14:12:45 +0100 Subject: [PATCH] Add a new way to get VERSION --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c14eeac..8fba869 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ -VERSION=0.1.1-alpha +CUR_SHA=$(shell git log -n1 --pretty='%h') +CUR_BRANCH=$(shell git branch --show-current) +VERSION=$(shell git describe --exact-match --tags $(CUR_SHA) 2>/dev/null || echo $(CUR_BRANCH)-$(CUR_SHA)) CTN:=$(shell which podman 2>&1 1>/dev/null && echo "podman" || echo "docker") PREFIX=~/.local