From c549d8550500285b6f289cd064a3b690e29e612a Mon Sep 17 00:00:00 2001 From: Chris Crone Date: Mon, 21 Sep 2020 12:21:41 +0200 Subject: [PATCH] makefile: Tidy up Signed-off-by: Chris Crone --- builder.Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/builder.Makefile b/builder.Makefile index 28e5d3953..36f5e74ca 100644 --- a/builder.Makefile +++ b/builder.Makefile @@ -39,32 +39,37 @@ endif all: cli +.PHONY: protos protos: protoc -I. --go_out=plugins=grpc,paths=source_relative:. ${PROTOS} +.PHONY: cli cli: GOOS=${GOOS} GOARCH=${GOARCH} $(GO_BUILD) $(TAGS) -o $(BINARY_WITH_EXTENSION) ./cli +.PHONY: cross cross: GOOS=linux GOARCH=amd64 $(GO_BUILD) $(TAGS) -o $(BINARY)-linux-amd64 ./cli GOOS=darwin GOARCH=amd64 $(GO_BUILD) $(TAGS) -o $(BINARY)-darwin-amd64 ./cli GOOS=windows GOARCH=amd64 $(GO_BUILD) $(TAGS) -o $(BINARY)-windows-amd64.exe ./cli +.PHONY: test test: go test $(TAGS) -cover $(shell go list ./... | grep -vE 'e2e') +.PHONY: lint lint: golangci-lint run --timeout 10m0s ./... +.PHONY: import-restrictions import-restrictions: import-restrictions --configuration import-restrictions.yaml +.PHONY: check-licese-headers check-license-headers: ./scripts/validate/fileheader +.PHONY: check-go-mod check-go-mod: ./scripts/validate/check-go-mod -FORCE: - -.PHONY: all protos cli cross test lint