diff --git a/Makefile b/Makefile index e831173..65cca10 100644 --- a/Makefile +++ b/Makefile @@ -7,19 +7,7 @@ LOCALSTATEDIR ?= $(PREFIX)/var RUNSTATEDIR ?= $(LOCALSTATEDIR)/run GO ?= $(shell type -a -P go | head -n 1) -# Set version variable -ifeq ($(VERSION),) - COMMIT := $(shell git rev-parse --short HEAD) - TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1) - TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true) - VERSION := $(COMMIT) - ifeq ($(COMMIT), $(TAG_COMMIT)) - VERSION := $(TAG) - endif - ifneq ($(shell git status --porcelain),) - VERSION := $(VERSION)-dirty - endif -endif +VERSION ?= $(shell git describe --tags --dirty) build: mkdir -p build