From 855c3e9a4e7a2457253eb502fcbd3221062db2ec Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Fri, 19 Jul 2024 16:16:46 +0530 Subject: [PATCH] KUBESAW-129: Makefile target to checck compatibility of local version with other repos Signed-off-by: Feny Mehta --- make/go.mk | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/make/go.mk b/make/go.mk index ccfd807a..22e5d4a7 100644 --- a/make/go.mk +++ b/make/go.mk @@ -27,4 +27,18 @@ tidy: .PHONY: vet vet: - go vet ./... \ No newline at end of file + go vet ./... + + +REPO_PATH = "" + +.PHONY: replace +replace: + $(eval C_PATH = $(PWD))\ + $(foreach repo,host-operator member-operator toolchain-e2e registration-service ,\ + $(eval REPO_PATH = /tmp/$(repo)) \ + rm -rf ${REPO_PATH}; \ + git clone https://github.com/codeready-toolchain/$(repo).git ${REPO_PATH}; \ + cd ${REPO_PATH}; \ + go mod edit -replace github.com/codeready-toolchain/toolchain-common=${C_PATH}; \ + ) \ No newline at end of file