diff --git a/Makefile b/Makefile index 6daefb453..67d6767de 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ PKG_PREFIX := github.com/VictoriaMetrics/VictoriaMetrics +DATEINFO_TAG ?= $(shell date -u +'%Y%m%d-%H%M%S') BUILDINFO_TAG ?= $(shell echo $$(git describe --long --all | tr '/' '-')$$( \ git diff-index --quiet HEAD -- || echo '-dirty-'$$(git diff-index -u HEAD | openssl sha1 | cut -c 10-17))) @@ -8,7 +9,7 @@ ifeq ($(PKG_TAG),) PKG_TAG := $(BUILDINFO_TAG) endif -GO_BUILDINFO = -X '$(PKG_PREFIX)/lib/buildinfo.Version=$(APP_NAME)-$(shell date -u +'%Y%m%d-%H%M%S')-$(BUILDINFO_TAG)' +GO_BUILDINFO = -X '$(PKG_PREFIX)/lib/buildinfo.Version=$(APP_NAME)-$(DATEINFO_TAG)-$(BUILDINFO_TAG)' .PHONY: $(MAKECMDGOALS)