Config finder make target (#1328)

* Add config-finder make target

* Add recursive functionality

* Add config finder to CI

* Workaround bash argument limit failures
This commit is contained in:
Abraham Gonzalez
2023-03-06 14:00:20 -08:00
committed by joey0320
parent e3424f7193
commit 317e0db4fd
4 changed files with 110 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ HELP_COMMANDS += \
" run-tests = run all assembly and benchmark tests" \
" launch-sbt = start sbt terminal" \
" {shutdown,start}-sbt-server = shutdown or start sbt server if using ENABLE_SBT_THIN_CLIENT" \
" find-config-fragments = list all config. fragments and their locations (recursive up to CONFIG_FRAG_LEVELS=$(CONFIG_FRAG_LEVELS))"
#########################################################################################
# include additional subproject make fragments
@@ -393,8 +394,21 @@ start-sbt-server: check-thin-client
cd $(base_dir) && $(SBT) "exit"
#########################################################################################
# print help text
# print help text (and other help)
#########################################################################################
# helper to add newlines (avoid bash argument too long)
define \n
endef
CONFIG_FRAG_LEVELS ?= 3
.PHONY: find-config-fragments
find-config-fragments: $(SCALA_SOURCES)
rm -rf /tmp/scala_files.f
@$(foreach file,$(SCALA_SOURCES),echo $(file) >> /tmp/scala_files.f${\n})
$(base_dir)/scripts/config-finder.py -l $(CONFIG_FRAG_LEVELS) /tmp/scala_files.f
.PHONY: help
help:
@for line in $(HELP_LINES); do echo "$$line"; done