-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (31 loc) · 1002 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
SHELL := /bin/bash
JSON_PP := json_pp -json_opt pretty,relaxed,utf8
# _site/api/concepts/*.json files are processed with jekyll-tidy-json plugin
GENERATED_JSONS := _site/api/concepts/*.jsonld
all: _site
clean:
rm -rf _site _source/_data/info.yaml _source/_data/metadata.yaml
data: _source/_data/info.yaml _source/_data/metadata.yaml
_site: data | bundle
bundle exec jekyll build
postprocess:
echo "Postprocessing JSONs..."; \
for f in ${GENERATED_JSONS}; do \
mv $${f} .tmp.json; \
${JSON_PP} < .tmp.json > $${f} && rm .tmp.json || mv .tmp.json $${f}; \
done
bundle:
bundle
_source/_data/info.yaml: metaversestandards-glossary/msf-termbase.meta.yaml
cp -f $< $@
_source/_data/metadata.yaml: metadata.yaml
cp -f $< $@
metadata.yaml:
scripts/generate_metadata.rb
serve:
bundle exec jekyll serve
update-init:
git submodule update --init
update-modules:
git submodule foreach git pull origin main
.PHONY: data bundle all open serve clean update-init update-modules postprocess