2021-07-08 16:34:09 +03:00
|
|
|
default: fmt get update test lint
|
2019-11-18 20:33:15 +03:00
|
|
|
|
2021-07-08 16:34:09 +03:00
|
|
|
GO := GO111MODULE=on GOPRIVATE=github.com/linkedin GOSUMDB=off go
|
|
|
|
GOBUILD := CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
|
|
|
|
GOTEST := $(GO) test -gcflags='-l' -p 3 -v -race -timeout 6m -coverprofile=profile.out -covermode=atomic
|
2019-11-18 20:33:15 +03:00
|
|
|
|
2021-07-08 16:34:09 +03:00
|
|
|
FILES := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -not -name '*_test.go')
|
|
|
|
TESTS := $(shell find . -name '*.go' -type f -not -name '*.pb.go' -not -name '*_generated.go' -name '*_test.go')
|
2019-11-18 20:33:15 +03:00
|
|
|
|
2021-07-08 16:34:09 +03:00
|
|
|
get:
|
|
|
|
$(GO) get ./...
|
|
|
|
$(GO) mod verify
|
|
|
|
$(GO) mod tidy
|
2019-11-18 20:33:15 +03:00
|
|
|
|
2021-07-08 16:34:09 +03:00
|
|
|
update:
|
|
|
|
$(GO) get -u -v all
|
|
|
|
$(GO) mod verify
|
|
|
|
$(GO) mod tidy
|
2019-11-18 20:33:15 +03:00
|
|
|
|
2021-07-08 16:34:09 +03:00
|
|
|
fmt:
|
|
|
|
gofmt -s -l -w $(FILES) $(TESTS)
|
2019-11-18 20:33:15 +03:00
|
|
|
|
2021-07-08 16:34:09 +03:00
|
|
|
lint:
|
|
|
|
golangci-lint run
|
2019-11-18 20:33:15 +03:00
|
|
|
|
2021-07-08 16:34:09 +03:00
|
|
|
test:
|
|
|
|
$(GOTEST) ./...
|