forked from vmware/go-ipfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
24 lines (18 loc) · 906 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
GO ?= go
GOPATH ?= $$($(GO) env GOPATH)
BINDIR ?= $(CURDIR)/bin
codegen:
GO111MODULE=on $(GO) get github.com/golang/mock/[email protected]
PATH=$$PATH:$(GOPATH)/bin $(GO) generate ./...
.coverage:
mkdir -p ./.coverage
test-unit: .coverage
$(GO) test ./... -covermode=atomic -coverprofile=.coverage/coverage_unit.txt
test-integration: .coverage
$(GO) test ./pkg/test/... -tags=integration -covermode=atomic -coverprofile=.coverage/coverage_integration.txt -coverpkg github.com/vmware/go-ipfix/pkg/collector,github.com/vmware/go-ipfix/pkg/exporter,github.com/vmware/go-ipfix/pkg/intermediate
golangci:
@curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.21.0
$(GOPATH)/bin/golangci-lint run -c .golangci.yml
collector:
@mkdir -p $(BINDIR)
GOOS=linux $(GO) build -o $(BINDIR) github.com/vmware/go-ipfix/cmd/collector/