mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-19 06:26:44 +00:00
Derive dev-tool CLI versions from go.mod (ginkgo, protoc-gen-go, goimports) (#10024)
* Derive Ginkgo CLI version from go.mod in test/Makefile Hardcoded @v2.22.0 pin drifted from go.mod's v2.28.3, causing Ginkgo CLI/package version mismatch warnings. Fixes #10023 Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> * Derive protoc-gen-go and goimports versions from go.mod in build-image Same drift issue as #10023: Dockerfile hardcoded @v1.33.0 and @v0.33.0 while go.mod had moved on. Build context is hack/build-image, which doesn't include go.mod, so versions are computed in the Makefile (which does have go.mod) and passed through as build-args, same as GOPROXY. protoc-gen-go-grpc and controller-gen/setup-envtest/golangci-lint are left as-is: no matching go.mod entry, or independently versioned from the module they live alongside. Fixes #10023 Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> --------- Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
This commit is contained in:
+2
-1
@@ -48,6 +48,7 @@ GOBIN := $(REPO_ROOT)/.go/bin
|
||||
TOOLS_BIN_DIR := $(TOOLS_DIR)/$(BIN_DIR)
|
||||
|
||||
GINKGO := $(GOBIN)/ginkgo
|
||||
GINKGO_VERSION := $(shell go list -m -f '{{.Version}}' github.com/onsi/ginkgo/v2 2>/dev/null)
|
||||
|
||||
KUSTOMIZE := $(TOOLS_BIN_DIR)/kustomize
|
||||
|
||||
@@ -186,7 +187,7 @@ ginkgo: ${GOBIN}/ginkgo
|
||||
|
||||
# This target does not run if ginkgo is already in $GOBIN
|
||||
${GOBIN}/ginkgo:
|
||||
GOBIN=${GOBIN} go install github.com/onsi/ginkgo/v2/ginkgo@v2.22.0
|
||||
GOBIN=${GOBIN} go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}
|
||||
|
||||
.PHONY: run-e2e
|
||||
run-e2e: ginkgo
|
||||
|
||||
Reference in New Issue
Block a user