diff --git a/.gobuilder.yml b/.gobuilder.yml new file mode 100644 index 0000000..2777a30 --- /dev/null +++ b/.gobuilder.yml @@ -0,0 +1,4 @@ +build_matrix: + general: + ldflags: + - "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" diff --git a/Makefile b/Makefile index e8dfb7e..adb7112 100644 --- a/Makefile +++ b/Makefile @@ -15,3 +15,6 @@ test: --exclude=bindata.go \ --exclude=configfile_test.go \ -D errcheck + +install: + go install -ldflags "-X main.version=$(shell git describe --tags || git rev-parse --short HEAD || echo dev)"