Fix root var and add sanity check

This commit is contained in:
Katrina Verey
2022-04-04 12:59:54 -04:00
parent 7440f974b8
commit 08924dc2f5
3 changed files with 19 additions and 8 deletions

View File

@@ -4,8 +4,8 @@ MYGOBIN = $(shell go env GOPATH)/bin
endif
export PATH := $(MYGOBIN):$(PATH)
export KUSTOMIZE_ROOT=$(shell pwd | sed 's|kustomize/.*|kustomize/|')
# only set this if not already set, so importing makefiles can override it
export KUSTOMIZE_ROOT ?= $(shell pwd | sed -E 's|(.*\/kustomize).*|\1|')
include $(KUSTOMIZE_ROOT)/Makefile-tools.mk
.PHONY: lint test fix fmt tidy vet