Commit f4210298 authored by Timo Teräs's avatar Timo Teräs

build: use version from git describe if available

parent 35562617
...@@ -10,9 +10,13 @@ ...@@ -10,9 +10,13 @@
PACKAGE := apk-tools PACKAGE := apk-tools
VERSION := 2.0_pre10 VERSION := 2.0_pre10
SVN_REV := $(shell svn info 2> /dev/null | grep ^Revision | cut -d ' ' -f 2) GIT_REV := $(shell git describe || echo exported)
ifneq ($(SVN_REV),) ifneq ($(GIT_REV), exported)
FULL_VERSION := $(VERSION)-r$(SVN_REV) ifneq ($(filter apk-tools-$(VERSION)%, $(GIT_REV)),)
FULL_VERSION := $(patsubst apk-tools-%,%,$(GIT_REV))
else
FULL_VERSION := $(GIT_REV)
endif
else else
FULL_VERSION := $(VERSION) FULL_VERSION := $(VERSION)
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment