From 0f38be544ce5c29fb82f789a01629f7cba53cd93 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 14 Apr 2018 13:05:59 +1000 Subject: [PATCH] Makefile: use git-describe to get the version string That means we can just tag releases and the version will be taken from the tag to generate the tarball. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 20d8f6c5..d5d0865b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,7 +20,7 @@ else endif endif -version ?= $(shell if [ -f .version ]; then cat .version; elif [ -d ../.git ]; then git rev-parse --short HEAD; else echo "unknown"; fi) +version ?= $(shell if [ -f .version ]; then cat .version; elif [ -d ../.git ]; then git describe --tags HEAD; else echo "unknown"; fi) sources := $(sort $(wildcard *.cc)) objects := $(addprefix ., $(sources:.cc=$(suffix).o))