blob: c3b431a562d95905bb96dbde8e1281ee7a2e4814 [file] [log] [blame]
Pragya Arya324337e2020-02-20 14:35:08 +05301default: fmt get update test lint
2
3GO := GO111MODULE=on GOPRIVATE=github.com/linkedin GOSUMDB=off go
4GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
5GOTEST := $(GO) test -gcflags='-l' -p 3 -v -race -timeout 6m -coverprofile=profile.out -covermode=atomic
6
7FILES := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -not -name '*_test.go')
8TESTS := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -name '*_test.go')
9
10get:
11 $(GO) get ./...
12 $(GO) mod verify
13 $(GO) mod tidy
14
15update:
16 $(GO) get -u -v all
17 $(GO) mod verify
18 $(GO) mod tidy
19
20fmt:
21 gofmt -s -l -w $(FILES) $(TESTS)
22
23lint:
24 golangci-lint run
25
26test:
27 $(GOTEST) ./...