Skip to content

Commit

Permalink
Include repo commit count in version
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Oct 14, 2017
1 parent 8a4f916 commit 8e037a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vyatta-cjdns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ CROSS_LDFLAGS?=''

PKGARCH?=$(shell dpkg --print-architecture)
BUILDNUMBER=$(shell git rev-list v$(RELEASE)..HEAD --count 2>/dev/null || echo 0)
REPOBUILDNUMBER=$(shell cd $(BUILDDIR_CJD) && git rev-list HEAD --count 2>/dev/null || 0)
ifeq ($(BUILDNUMBER),0)
VERSION=$(RELEASE)
VERSION=$(RELEASE)-$(shell echo $(REPOBUILDNUMBER) | xargs printf "%04d")
else
VERSION=$(RELEASE).$(shell echo $(BUILDNUMBER) | bc)
VERSION=$(RELEASE).$(shell echo $(BUILDNUMBER) | bc)-$(shell echo $(REPOBUILDNUMBER) | xargs printf "%04d")
endif

CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
Expand Down

0 comments on commit 8e037a9

Please sign in to comment.