add version flag

This commit is contained in:
Leo Antunes
2019-03-26 23:26:54 +01:00
parent e89a7141e5
commit 407bfbfb7e
3 changed files with 16 additions and 2 deletions

6
Makefile Normal file
View File

@ -0,0 +1,6 @@
VERSION=`git describe --tags --dirty --always`
LDFLAGS=-ldflags "-X main.version=${VERSION}"
build:
go build ${LDFLAGS} ${OPTS}