Normalize deps in makefile.

This commit is contained in:
monopole
2021-02-08 13:21:42 -08:00
parent 4c456d60a4
commit 4de6db3d59

View File

@@ -13,20 +13,31 @@ fix:
fmt: fmt:
go fmt ./... go fmt ./...
generate: $(MYGOBIN)/addlicense:
(which $(MYGOBIN)/stringer || go get golang.org/x/tools/cmd/stringer) go get github.com/google/addlicense
$(MYGOBIN)/golangci-lint:
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1
$(MYGOBIN)/k8scopy:
( cd ../cmd/k8scopy; go install . )
$(MYGOBIN)/stringer:
go get golang.org/x/tools/cmd/stringer
generate: $(MYGOBIN)/stringer $(MYGOBIN)/k8scopy
go generate ./... go generate ./...
license: clean:
(which $(MYGOBIN)/addlicense || go get github.com/google/addlicense) rm -rf yaml/internal/k8sgen/pkg
license: $(MYGOBIN)/addlicense
$(MYGOBIN)/addlicense -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . $(MYGOBIN)/addlicense -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
tidy: tidy:
go mod tidy go mod tidy
lint: lint: $(MYGOBIN)/golangci-lint
(which $(MYGOBIN)/golangci-lint || \
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1)
$(MYGOBIN)/golangci-lint \ $(MYGOBIN)/golangci-lint \
--skip-dirs yaml/internal/k8sgen/pkg \ --skip-dirs yaml/internal/k8sgen/pkg \
run ./... run ./...
@@ -36,6 +47,3 @@ test:
vet: vet:
go vet ./... go vet ./...
clean:
rm -rf yaml/internal/k8sgen/pkg