22 lines
610 B
Makefile
22 lines
610 B
Makefile
GO_MODULE_IMPORT := go.datafortress.dev/pkg/central-arch-spec-models
|
|
GO_MODELS_PKG := spec
|
|
|
|
SPEC_XML_NS := https://datafortress.dev/xml/central-arch-specification
|
|
SPEC_SCHEMA_DIR := ../central-arch-spec-schema
|
|
SPEC_SCHEMA_FILE := specification.xsd
|
|
|
|
.PHONY: all
|
|
all: tests
|
|
|
|
.PHONY: tests
|
|
tests:
|
|
go test $(shell find . -type f -name '*_test.go' -print)
|
|
|
|
.PHONY: deps
|
|
deps:
|
|
go install github.com/gocomply/xsd2go/cli/gocomply_xsd2go@latest
|
|
|
|
.PHONY: generate
|
|
generate:
|
|
gocomply_xsd2go convert --xmlns-override=${SPEC_XML_NS}=${GO_MODELS_PKG} ${SPEC_SCHEMA_DIR}/${SPEC_SCHEMA_FILE} ${GO_MODULE_IMPORT} .
|