Skip to content

Commit

Permalink
some better way to run it
Browse files Browse the repository at this point in the history
Signed-off-by: Feny Mehta <[email protected]>
  • Loading branch information
fbm3307 committed Jul 23, 2024
1 parent 12b3cb4 commit 1304ff5
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions make/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
)

0 comments on commit 1304ff5

Please sign in to comment.