Re: [WireGuard] RFE: A notion of VERSION (was: Debugging AllowedIps)

2016-11-16 Thread Jason A. Donenfeld
On Wed, Nov 16, 2016 at 10:01 PM, Daniel Kahn Gillmor wrote: > On Thu 2016-11-17 02:40:30 +0900, Jason A. Donenfeld wrote: >> Trying again with no line breaks: >> > Please don't assume that the source code is built from a git repository. > On debian, we build from the

Re: [WireGuard] RFE: A notion of VERSION (was: Debugging AllowedIps)

2016-11-16 Thread Daniel Kahn Gillmor
On Thu 2016-11-17 02:40:30 +0900, Jason A. Donenfeld wrote: > Trying again with no line breaks: > >> WIREGUARD_VERSION := $(shell parent_name=$$(readlink -f .. | sed -n >> 's:.*/[wW]ire[Gg]uard[a-z-]*-\([0-9.]\+\)$$:\1:p'); if [ -d ../.git ]; then >> echo "git-$$(git rev-parse --short HEAD)";

Re: [WireGuard] RFE: A notion of VERSION (was: Debugging AllowedIps)

2016-11-16 Thread Jason A. Donenfeld
The best I could come with: > WIREGUARD_VERSION := $(shell parent_name=$$(readlink -f .. | sed -n > 's:.*/[wW]ire[Gg]uard[a-z-]*-\([0-9.]\+\)$$:\1:p'); if [ -d ../.git ]; then > echo "git-$$(git rev-parse --shor t HEAD)"; elif [ -n $parent_name ]; then echo "$$parent_name"; else echo