tools: add "make describe" (#269)

A make rule to handle some subtleties in getting an accurate stable
git-describe version string.
This commit is contained in:
Simon Michael 2015-09-03 12:42:14 -07:00
parent e1f5023e30
commit 690181426d

View File

@ -148,7 +148,6 @@ VERSIONFILE=.version
VERSION:=$(shell cat $(VERSIONFILE))
# the number of commits since the last tag
#DESCRIBE:=$(shell git describe --tags --match 'hledger-[0-9]*' --dirty )
PATCHLEVEL:=$(shell git describe --tags --match 'hledger-[0-9]*' --long | awk -F- '{print $$3}')
#PATCHLEVEL:=$(shell git describe --tags --match 'hledger-web-[0-9]*' --long | awk -F- '{print $$4}')
# the number of commits since the last_release tag
@ -1074,6 +1073,10 @@ $(call def-help-subsection,RELEASING:)
# # )
# # darcs record -m "bump version" $(VERSIONFILE) $(VERSIONSENSITIVEFILES)
describe: \
$(call def-help,describe, show an accurate git-describe version string )
@git describe --tags --match 'hledger-[0-9]*' --dirty
setversion: $(VERSIONSENSITIVEFILES) \
$(call def-help,setversion, update all version strings to match $(VERSIONFILE) )