Make version/git optional

This commit is contained in:
David Newhall II 2019-06-12 11:05:05 -07:00
parent 3749942d05
commit 3fed0946e6
1 changed files with 4 additions and 2 deletions

View File

@ -3,8 +3,10 @@ URL=https://github.com/davidnewhall/unifi-poller
MAINT="David Newhall II <david at sleepers dot pro>"
DESC="This daemon polls a Unifi controller at a short interval and stores the collected metric data in an Influx Database."
PACKAGE:=./cmd/$(BINARY)
VERSION:=$(shell git tag -l --merged | tail -n1 | tr -d v)
ITERATION:=$(shell git rev-list --count HEAD)
ifeq ($(VERSION),)
VERSION:=$(shell git tag -l --merged | tail -n1 | tr -d v||echo development)
endif
ITERATION:=$(shell git rev-list --count HEAD||echo 0)
all: man build