regression: make `$VERSION` 3rd-party independant

3rd-party dependencies cannot be installed pre-build since Makefile
variables are initialized earlier than that.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
This commit is contained in:
Pranshu Srivastava 2024-12-11 20:23:03 +05:30
parent 5e332b307a
commit 4bce5ea4bd
No known key found for this signature in database
GPG Key ID: 63938388A4528764
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ FLAGS =
TESTENVVAR =
REGISTRY ?= gcr.io/k8s-staging-kube-state-metrics
TAG_PREFIX = v
VERSION = $(shell gomplate -d config=./data.yaml --in '{{ (datasource "config").version }}')
VERSION = $(shell grep '^version:' data.yaml | grep -oE "[0-9]+.[0-9]+.[0-9]+")
TAG ?= $(TAG_PREFIX)$(VERSION)
LATEST_RELEASE_BRANCH := release-$(shell echo $(VERSION) | grep -ohE "[0-9]+.[0-9]+")
BRANCH = $(strip $(shell git rev-parse --abbrev-ref HEAD))