From 5471608a3f2ba0b31585db8eea9e0063db4e8a23 Mon Sep 17 00:00:00 2001 From: "Han-Ru Chen (Future-Outlier)" Date: Wed, 6 Nov 2024 01:19:38 +0800 Subject: [PATCH] [flyteadmin][API] get control plane version (#5934) * Gate feature by checking backend version Signed-off-by: Future-Outlier * dev Signed-off-by: Future-Outlier * update Signed-off-by: Future-Outlier --------- Signed-off-by: Future-Outlier --- Makefile | 4 ++-- flyteadmin/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b3a37c85c4..a8ac961f02 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,10 @@ define PIP_COMPILE pip-compile $(1) --upgrade --verbose --resolver=backtracking --annotation-style=line endef -GIT_VERSION := $(shell git describe --always --tags) +GIT_VERSION := $(shell git describe --tags --long --match "v*" --first-parent) GIT_HASH := $(shell git rev-parse --short HEAD) TIMESTAMP := $(shell date '+%Y-%m-%d') -PACKAGE ?=github.com/flyteorg/flytestdlib +PACKAGE ?=github.com/flyteorg/flyte/flytestdlib LD_FLAGS="-s -w -X $(PACKAGE)/version.Version=$(GIT_VERSION) -X $(PACKAGE)/version.Build=$(GIT_HASH) -X $(PACKAGE)/version.BuildTime=$(TIMESTAMP)" TMP_BUILD_DIR := .tmp_build diff --git a/flyteadmin/Makefile b/flyteadmin/Makefile index 4a715a02ce..9372c0bfb8 100644 --- a/flyteadmin/Makefile +++ b/flyteadmin/Makefile @@ -5,11 +5,11 @@ include ../boilerplate/flyte/docker_build/Makefile include ../boilerplate/flyte/golang_test_targets/Makefile include ../boilerplate/flyte/end2end/Makefile -GIT_VERSION := $(shell git describe --always --tags) +GIT_VERSION := $(shell git describe --tags --long --match "v*" --first-parent) GIT_HASH := $(shell git rev-parse --short HEAD) TIMESTAMP := $(shell date '+%Y-%m-%d') # TODO(monorepo): Do we need to change this? This is used in the service that provides a version. -PACKAGE ?=github.com/flyteorg/flytestdlib +PACKAGE ?=github.com/flyteorg/flyte/flytestdlib LD_FLAGS="-s -w -X $(PACKAGE)/version.Version=$(GIT_VERSION) -X $(PACKAGE)/version.Build=$(GIT_HASH) -X $(PACKAGE)/version.BuildTime=$(TIMESTAMP)"