Merge pull request #2641 from anikeev-yadro/filter-version-tag

Makefile: Filter version tags for version calculation
This commit is contained in:
Roman Khimov 2022-08-18 14:58:56 +03:00 committed by GitHub
commit c056c641d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)'"