From ec052a7c4c3f1c68bab409fd75dc553856945f48 Mon Sep 17 00:00:00 2001 From: adnano Date: Tue, 20 Apr 2021 16:44:29 -0400 Subject: [PATCH] Makefile: Use 'git describe' to name the version --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5eafb66..4ba3f64 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,12 @@ .SUFFIXES: .SUFFIXES: .1 .1.scd -VERSION=0.1.0-dev +_git_version=$(shell git describe --tags --dirty 2>/dev/null) +ifeq ($(strip $(_git_version)),) +VERSION=0.1.0 +else +VERSION=$(_git_version) +endif PREFIX?=/usr/local BINDIR?=$(PREFIX)/bin