More makefile cleanup

This commit is contained in:
Katrina Verey
2022-04-04 16:43:43 -04:00
parent 0fa010c7e7
commit 46875b6ac4
12 changed files with 74 additions and 103 deletions

View File

@@ -5,7 +5,7 @@ endif
export PATH := $(MYGOBIN):$(PATH)
# only set this if not already set, so importing makefiles can override it
export KUSTOMIZE_ROOT ?= $(shell pwd | sed -E 's|(.*\/kustomize).*|\1|')
export KUSTOMIZE_ROOT ?= $(shell pwd | sed -E 's|(.*\/kustomize)/(.*)|\1|')
include $(KUSTOMIZE_ROOT)/Makefile-tools.mk
.PHONY: lint test fix fmt tidy vet
@@ -13,7 +13,7 @@ include $(KUSTOMIZE_ROOT)/Makefile-tools.mk
lint: $(MYGOBIN)/golangci-lint
$(MYGOBIN)/golangci-lint \
-c $$KUSTOMIZE_ROOT/.golangci.yml \
--path-prefix $(shell pwd | sed 's|.*kustomize/||') \
--path-prefix $(shell pwd | sed -E 's|(.*\/kustomize)/(.*)|\2|') \
run ./...
test: