-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
39 lines (30 loc) · 963 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
GO=GO111MODULE=on go
.PHONY: test gocomply_metaschema clean build pkger vendor
build:
go build ./...
go build ./cli/gocomply_oscalkit
test:
@echo "Running Oscalkit test Utility"
@echo "Running remaining tests"
@go test -race -coverprofile=coverage.txt -covermode=atomic -v $(shell go list ./... | grep -v "/vendor/")
gocomply_metaschema:
ifeq ("$(wildcard $(GOPATH)/bin/gocomply_metaschema)","")
$(GO) get -u -v github.com/gocomply/metaschema/cli/gocomply_metaschema@master
endif
generate: OSCAL gocomply_metaschema
gocomply_metaschema generate ./OSCAL/src/metaschema github.com/gocomply/oscalkit types/oscal
OSCAL:
git clone --depth 1 https://github.com/usnistgov/OSCAL
clean:
rm -rf ./OSCAL
rm -rf ./gocomply_oscalkit
pkger:
ifeq ("$(wildcard $(GOPATH)/bin/pkger)","")
go get -u -v github.com/markbates/pkger/cmd/pkger
endif
pkg/bundled/pkged.go: pkger OSCAL
pkger -o pkg/bundled
vendor:
$(GO) mod tidy
$(GO) mod vendor
$(GO) mod verify