Skip to content

Commit 0d9d51a

Browse files
mbaldessaridarkdoc
andcommitted
Add a warning when pattern folder and pattern name differ
Co-Authored-By: Akos Eros <[email protected]>
1 parent 7f6043d commit 0d9d51a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ validate-schema: ## validates values files against schema in common/clustergroup
164164

165165
.PHONY: validate-prereq
166166
validate-prereq: ## verify pre-requisites
167+
$(eval GLOBAL_PATTERN := $(shell yq -r .global.pattern values-global.yaml))
168+
@if [ $(NAME) != $(GLOBAL_PATTERN) ]; then\
169+
echo "";\
170+
echo "WARNING: folder directory is \"$(NAME)\" and global.pattern is set to \"$(GLOBAL_PATTERN)\"";\
171+
echo "this can create problems. Please make sure they are the same!";\
172+
echo "";\
173+
fi
167174
@if [ ! -f /run/.containerenv ]; then\
168175
echo "Checking prerequisites:";\
169176
for t in $(EXECUTABLES); do if ! which $$t > /dev/null 2>&1; then echo "No $$t in PATH"; exit 1; fi; done;\

0 commit comments

Comments
 (0)