diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..36c126c2c --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ + +default: help + +help: + @echo "Usage: make " + @echo + @echo " * 'fmt' - format the json with indentation" + @echo " * 'validate' - build the validation tool" + +fmt: + for i in *.json ; do jq --indent 2 -M . "$${i}" > xx && cat xx > "$${i}" && rm xx ; done + +.PHONY: validate-examples +validate-examples: oci-validate-examples + ./oci-validate-examples < manifest.md + +oci-validate-json: validate.go + go build ./cmd/oci-validate-json + +oci-validate-examples: cmd/oci-validate-examples/main.go + go build ./cmd/oci-validate-examples + diff --git a/examples.go b/cmd/oci-validate-examples/main.go similarity index 100% rename from examples.go rename to cmd/oci-validate-examples/main.go diff --git a/schema/validate.go b/cmd/oci-validate-json/main.go similarity index 100% rename from schema/validate.go rename to cmd/oci-validate-json/main.go diff --git a/schema/Makefile b/schema/Makefile deleted file mode 100644 index ae940718e..000000000 --- a/schema/Makefile +++ /dev/null @@ -1,15 +0,0 @@ - -default: help - -help: - @echo "Usage: make " - @echo - @echo " * 'fmt' - format the json with indentation" - @echo " * 'validate' - build the validation tool" - -fmt: - for i in *.json ; do jq --indent 2 -M . "$${i}" > xx && cat xx > "$${i}" && rm xx ; done - -validate: validate.go - go build ./validate.go -