Skip to content

Commit 088bad7

Browse files
committed
feat: Make target for generating everything
1 parent 785ae79 commit 088bad7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include docker/.env
22

33
BUILD_PRINT = \e[1;34mSTEP: \e[0m
4+
PREFERRED_PROFILES := owl-core shacl-core skos-core
5+
DEFAULT_OUTPUT := ./output
46

57
#-----------------------------------------------------------------------------
68
# Install dev environment
@@ -39,3 +41,25 @@ generate_html_templates:
3941
# example: make generate_asciidoc_templates ap=dqgen/resources/aps/owl-core.csv output=./output
4042
generate_asciidoc_templates:
4143
@ python -m dqgen.entrypoints.cli.generate_asciidoc_template $(ap) $(output)
44+
45+
#-----------------------------------------------------------------------------
46+
# Batch generation for multiple profiles
47+
#-----------------------------------------------------------------------------
48+
# Usage: make generate_all PREFERRED_PROFILES="owl-core another-profile" output=./output
49+
50+
generate_all_profiles_templates:
51+
@ echo "==> Generating all templates for profiles $(PREFERRED_PROFILES)"
52+
@ for profile in $(PREFERRED_PROFILES); do \
53+
echo "--> profile: $$profile"; \
54+
ap_path=dqgen/resources/aps/$${profile}.csv; \
55+
echo "$(BUILD_PRINT)Generating queries for $$ap_path"; \
56+
python -m dqgen.entrypoints.cli.generate_queries $$ap_path $(DEFAULT_OUTPUT); \
57+
echo "$(BUILD_PRINT)Generating HTML templates for $$ap_path"; \
58+
python -m dqgen.entrypoints.cli.generate_html_template $$ap_path $(DEFAULT_OUTPUT); \
59+
echo "$(BUILD_PRINT)Generating AsciiDoc templates for $$ap_path"; \
60+
python -m dqgen.entrypoints.cli.generate_asciidoc_template $$ap_path $(DEFAULT_OUTPUT); \
61+
done
62+
63+
clean:
64+
@ echo "$(BUILD_PRINT)Cleaning up generated files"
65+
@ rm -rf $(DEFAULT_OUTPUT)/*

0 commit comments

Comments
 (0)