Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ testbin/*
*~
testdata/.remediators/
.history/*
.tools/
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -540,3 +540,22 @@ container-push: ## Push containers (NOTE: catalog can't be build before bundle

.PHONY: build-and-run
build-and-run: container-build-ocp container-push bundle-run

# Shared dev environment
# Uses a local sibling checkout if available (e.g. ../tools),
# otherwise downloads the tools repo into .tools/ on first dev-* target use.
TOOLS_DIR ?= $(shell cd .. && pwd)/tools
DEV_MK := $(TOOLS_DIR)/dev/dev.mk
ifeq ($(wildcard $(DEV_MK)),)
TOOLS_DIR := $(shell pwd)/.tools
DEV_MK := $(TOOLS_DIR)/dev/dev.mk
endif
-include $(DEV_MK)
Comment thread
mpryc marked this conversation as resolved.
ifeq ($(wildcard $(DEV_MK)),)
dev-%:
@echo "Downloading medik8s/tools into $(TOOLS_DIR)..."
@if [ -d $(TOOLS_DIR) ]; then echo " Removing stale $(TOOLS_DIR)..."; rm -rf $(TOOLS_DIR); fi
@git clone --depth 1 https://github.com/medik8s/tools.git $(TOOLS_DIR)
@test -f $(DEV_MK) || { echo "Error: $(DEV_MK) not found after clone."; exit 1; }
@$(MAKE) $@
endif
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Loading