forked from open-telemetry/opentelemetry-configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
22 lines (18 loc) · 731 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SCHEMA_FILES := $(shell find . -path './schema/*.json' -exec basename {} \; | sort)
.PHONY: all
all: install-tools compile-schema validate-example
.PHONY: compile-schema
compile-schema:
@if ! npm ls ajv-cli; then npm install; fi
@for f in $(SCHEMA_FILES); do \
npx --no ajv-cli compile --spec=draft2020 -s ./schema/$$f -r "./schema/!($$f)" \
|| exit 1; \
done
.PHONY: validate-example
validate-example:
@if ! npm ls ajv-cli; then npm install; fi
npx --no ajv-cli validate --spec=draft2020 --errors=text -s ./schema/opentelemetry_configuration.json -r "./schema/!(opentelemetry_configuration.json)" -d ./kitchen-sink-example.yaml
.PHONY: install-tools
install-tools:
npm install
@echo "All tools installed"