diff --git a/make/go.mk b/make/go.mk index 82bd13af..915f7a68 100644 --- a/make/go.mk +++ b/make/go.mk @@ -29,17 +29,29 @@ tidy: vet: go vet ./... +TMP_DIR = /tmp/ +BASE_REPO_PATH = $(shell mktemp -d ${TMP_DIR}crt-verify.XXX) +GH_BASE_URL_KS = https://github.com/kubesaw/ +GH_BASE_URL_CRT = https://github.com/codeready-toolchain/ +GH_KSCTL = $(GH_BASE_URL_KS)ksctl +GH_HOST = $(GH_BASE_URL_CRT)host-operator +GH_MEMBER = $(GH_BASE_URL_CRT)member-operator +GH_REGSVC = $(GH_BASE_URL_CRT)registration-service +GH_E2E = $(GH_BASE_URL_CRT)toolchain-e2e -REPO_PATH = "" .PHONY: verify-replace-run verify-replace-run: $(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}; \ + $(foreach repo, ${GH_HOST} ${GH_MEMBER} ${GH_REGSVC} ${GH_E2E} ${GH_KSCTL},\ + $(eval REPO_PATH = ${BASE_REPO_PATH}/$(shell basename $(repo))) \ + git clone --depth=1 $(repo) ${REPO_PATH}; \ cd ${REPO_PATH}; \ + if [[ "${GH_HOST}" == "$(repo)" ]]; then \ + $(MAKE) generate ; \ + elif [[ "${GH_MEMBER}" == "$(repo)" ]]; then\ + $(MAKE) generate-assets ; \ + fi; \ go mod edit -replace github.com/codeready-toolchain/toolchain-common=${C_PATH}; \ $(MAKE) verify-dependencies; \ ) \ No newline at end of file