From: Andrew Ruthven Date: Mon, 12 Nov 2018 20:31:45 +0000 (+1300) Subject: Turns out I occasionally need to override the version X-Git-Tag: 1.0.0~52 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec2141689f433f0875aec712b9af1460b0c4be8c;p=mythtv-status.git Turns out I occasionally need to override the version --- diff --git a/Makefile b/Makefile index f23ea3c..66a5e4c 100755 --- a/Makefile +++ b/Makefile @@ -9,7 +9,9 @@ release=sid sponsor_keyid=19D03486 build=dpkg-buildpackage -rfakeroot -i'(.git|build|.gitignore|testing)*' -I.git -Ibuild -I.gitignore -Itesting -tc -kE4D3E863 +ifeq ($(version),) version=$(shell git tag -l | grep '^[0-9]' | sort -t"." -k 1,1 -k 2,2 -k 3,3 -n | tail -1) +endif deb_version=$(shell git tag -l | grep ^debian-$(release)-[[:digit:]] | sort -t"." -k 1,1 -k 2,2 -k 3,3 -n | tail -1 | sed 's/debian-$(release)-//' | sed 's/@/~/') deb=$(package)_$(deb_version)_all.deb