From f030235e36aead0f1bea4788cdbf8c4e949e49c1 Mon Sep 17 00:00:00 2001 From: Pedro Aguiar <72931357+codespearhead@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:56:36 -0400 Subject: [PATCH] Set the correct version release in the OC binary Update `SOURCE_GIT_TAG` parsing logic to correctly identify the new tag format: `openshift-clients-`. It fixes #1688, #744, #740. Previously, it incorrectly returned `v4.2.0-alpha.0` for all releases. --- .../github.com/openshift/build-machinery-go/make/lib/golang.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/github.com/openshift/build-machinery-go/make/lib/golang.mk b/vendor/github.com/openshift/build-machinery-go/make/lib/golang.mk index d08f74a42d..ca2c1a71f0 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/lib/golang.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/lib/golang.mk @@ -50,7 +50,7 @@ GO_TEST_FLAGS ?=-race GO_LD_EXTRAFLAGS ?= -SOURCE_GIT_TAG ?=$(shell git describe --long --tags --abbrev=7 --match 'v[0-9]*' || echo 'v0.0.0-unknown-$(SOURCE_GIT_COMMIT)') +SOURCE_GIT_TAG ?=$(shell git describe --long --tags --abbrev=7 --match 'openshift-clients-*' | sed 's/openshift-clients-/v/g' || echo 'v0.0.0-unknown-$(SOURCE_GIT_COMMIT)') SOURCE_GIT_COMMIT ?=$(shell git rev-parse --short "HEAD^{commit}" 2>/dev/null) SOURCE_GIT_TREE_STATE ?=$(shell ( ( [ ! -d ".git/" ] || git diff --quiet ) && echo 'clean' ) || echo 'dirty')