From 7340a0609c1cbe7773e0a8ca7ac2632b2c5d19ff Mon Sep 17 00:00:00 2001 From: anikeev-yadro Date: Thu, 11 Aug 2022 16:30:45 +0300 Subject: [PATCH] Use only v-prefixed tags for version calculation This allows us to use any custom tags along with tags that denote releases. Signed-off-by: anikeev-yadro --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2f79f4548..2db8a0546 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ DC_FILE ?= ".docker/docker-compose.yml" # Single docker-compose for Ubuntu/WSC, ENV_IMAGE_TAG="env_neo_go_image" REPO ?= "$(shell go list -m)" -VERSION ?= "$(shell git describe --tags 2>/dev/null | sed 's/^v//')" +VERSION ?= "$(shell git describe --tags --match "v*" 2>/dev/null | sed 's/^v//')" MODVERSION ?= "$(shell cat go.mod | cat go.mod | sed -r -n -e 's|.*pkg/interop (.*)|\1|p')" BUILD_FLAGS = "-X '$(REPO)/pkg/config.Version=$(VERSION)' -X '$(REPO)/cli/smartcontract.ModVersion=$(MODVERSION)'"