From 1b6f9dbb293240218a6f9ce6645e10f108c13069 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Sun, 9 Jul 2017 20:41:41 +0300 Subject: [PATCH] Put the version in config.mk instead of a separate file There is no need to have a separate VERSION file in release tarballs, having the version in config.mk directly allows for a proper fallback in case the git repository and the version file doesn't exists. The most important example of this is the tarballs that github creates on every release. --- config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.mk b/config.mk index 3ebdb00..dac98de 100644 --- a/config.mk +++ b/config.mk @@ -3,8 +3,8 @@ PREFIX ?= /usr/local MANPREFIX = ${PREFIX}/share/man # In dist tarballs, the version is stored in the VERSION files. -VERSION := '$(shell [ -f VERSION ] && cat VERSION)' -ifeq ('',$(VERSION)) +VERSION := "1.1.0 (git-unknown)" +ifneq ($(wildcard ./.git/.),) VERSION := $(shell git describe --tags) endif