Makefile cleanup

This commit is contained in:
Katrina Verey
2022-03-31 18:29:33 -04:00
parent 672c751715
commit 2a9adbeb1e
10 changed files with 281 additions and 275 deletions

View File

@@ -1,2 +0,0 @@
Copyright {{.Year}} {{.Holder}}
SPDX-License-Identifier: Apache-2.0

View File

@@ -7,21 +7,14 @@ MYGOBIN = $(shell go env GOPATH)/bin
endif
export PATH := $(MYGOBIN):$(PATH)
.PHONY: generate license fix vet fmt test lint tidy clean
include ../Makefile-tools.mk
$(MYGOBIN)/addlicense:
go get github.com/google/addlicense
$(MYGOBIN)/golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2
.PHONY: generate fix vet fmt test lint tidy clean
$(MYGOBIN)/k8scopy:
( cd ../cmd/k8scopy; go install . )
$(MYGOBIN)/stringer:
go get golang.org/x/tools/cmd/stringer
all: license fix vet fmt test lint tidy
all: generate fix vet fmt test lint tidy
k8sGenDir := yaml/internal/k8sgen/pkg
@@ -39,10 +32,6 @@ lint: $(MYGOBIN)/golangci-lint
--skip-dirs yaml/internal/k8sgen/pkg \
--skip-dirs internal/forked
license: $(MYGOBIN)/addlicense
( find . -type f -not -path "*/internal/forked/github.com/go-yaml*" -exec bash -c "$(MYGOBIN)/addlicense -y 2022 -c 'The Kubernetes Authors.' -f LICENSE_TEMPLATE {}" ";" )
test:
go test -cover ./...

View File

@@ -27,7 +27,6 @@ import (
"strings"
"log"
"sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/selection"
"sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/util/sets"
"sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/util/validation"