Can set version in Makefile

This commit is contained in:
Mikhail f. Shiryaev 2022-06-15 11:52:37 +02:00
parent a70cda9670
commit 1553f67809
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -6,7 +6,8 @@ BUILD_DIR=dist
TIMESTAMP := $(shell date +%Y%m%d-%H%M)
COMMIT := $(shell git rev-parse --short HEAD)
MODULE := github.com/ClickHouse/ClickHouse/programs/diagnostics
DEVLDFLAGS = -ldflags "-X ${MODULE}/cmd.Version=v.dev-${TIMESTAMP} -X ${MODULE}/cmd.Commit=${COMMIT}"
VERSION := v.dev-${TIMESTAMP}
DEVLDFLAGS = -ldflags "-X ${MODULE}/cmd.Version=${VERSION} -X ${MODULE}/cmd.Commit=${COMMIT}"
# override with env variable to test other versions e.g. 21.11.10.1
CLICKHOUSE_VERSION ?= latest