-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
41 lines (32 loc) · 1.11 KB
/
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
CHECK_TOOLS += jsonschema
MANIFEST_SOURCES ?= $(shell find . -type f -name '*.json' -maxdepth 1 -and -not -path './INDEX.json')
include vendor/mk/base.mk
include vendor/mk/json.mk
build:
.PHONY: build
test: ## Runs all tests
.PHONY: test
check: checktools check-json check-index check-manifests ## Checks all linting, styling, & other rules
.PHONY: check
clean: ## Cleans up project
@echo "--- $@"
rm -rf tmp
.PHONY: clean
check-index: tmp/index.schema.json ### Checks the plugin index
@echo "--- $@"
jsonschema -i ./INDEX $<
.PHONY: check-index
check-manifests: tmp/plugin_manifest.schema.json ### Checks the plugin index
@echo "--- $@"
for manifest in $(MANIFEST_SOURCES); do \
echo " - $$manifest"; jsonschema -i "$$manifest" $<; \
done
.PHONY: check-manifests
tmp/index.schema.json:
@echo "--- $@"
mkdir -p $$(dirname $@)
curl -sSfL https://raw.githubusercontent.com/ix-plugin-hub/iocage-plugin-index/master/index.schema -o $@
tmp/plugin_manifest.schema.json:
@echo "--- $@"
mkdir -p $$(dirname $@)
curl -sSfL https://raw.githubusercontent.com/iocage/iocage/master/iocage_lib/plugin_manifest.json -o $@