Makefiles for all modules

This commit is contained in:
Katrina Verey
2022-04-01 15:45:48 -04:00
parent 2a9adbeb1e
commit 0d32543ebd
49 changed files with 152 additions and 41 deletions

32
Makefile-modules.mk Normal file
View File

@@ -0,0 +1,32 @@
MYGOBIN = $(shell go env GOBIN)
ifeq ($(MYGOBIN),)
MYGOBIN = $(shell go env GOPATH)/bin
endif
export PATH := $(MYGOBIN):$(PATH)
export KUSTOMIZE_ROOT=$(shell pwd | sed 's|kustomize/.*|kustomize/|')
include $(KUSTOMIZE_ROOT)/Makefile-tools.mk
.PHONY: lint test fix fmt tidy vet
lint: $(MYGOBIN)/golangci-lint
$(MYGOBIN)/golangci-lint \
-c $$KUSTOMIZE_ROOT/.golangci.yml \
--path-prefix $(shell pwd | sed 's|.*kustomize/||') \
run ./...
test:
go test -v -timeout 45m -cover ./...
fix:
go fix ./...
fmt:
go fmt ./...
tidy:
go mod tidy
vet:
go vet ./...