Fix broken Makefiles.

This commit is contained in:
jregan
2020-04-22 12:04:18 -07:00
parent e287d68d0f
commit efeb26c634
8 changed files with 29 additions and 15 deletions

View File

@@ -5,7 +5,7 @@
GOBIN := $(shell go env GOPATH)/bin GOBIN := $(shell go env GOPATH)/bin
all: generate license fix vet fmt test lint tidy all: generate license fix vet fmt test tidy
fix: fix:
go fix ./... go fix ./...
@@ -33,4 +33,3 @@ test:
vet: vet:
go vet ./... go vet ./...

View File

@@ -21,8 +21,8 @@ generate:
(cd image && GOBIN=$(GOBIN) go generate ./...) (cd image && GOBIN=$(GOBIN) go generate ./...)
license: license:
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense) (which $(GOBIN)/addlicense || go get github.com/google/addlicense)
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . $(GOBIN)/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
tidy: tidy:
(cd image && go mod tidy) (cd image && go mod tidy)

View File

@@ -21,8 +21,8 @@ generate:
(cd image && GOBIN=$(GOBIN) go generate ./...) (cd image && GOBIN=$(GOBIN) go generate ./...)
license: license:
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense) (which $(GOBIN)/addlicense || go get github.com/google/addlicense)
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . $(GOBIN)/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
tidy: tidy:
(cd image && go mod tidy) (cd image && go mod tidy)

View File

@@ -21,8 +21,8 @@ generate:
(cd image && GOBIN=$(GOBIN) go generate ./...) (cd image && GOBIN=$(GOBIN) go generate ./...)
license: license:
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense) (which $(GOBIN)/addlicense || go get github.com/google/addlicense)
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . $(GOBIN)/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
tidy: tidy:
(cd image && go mod tidy) (cd image && go mod tidy)

View File

@@ -3,9 +3,11 @@
.PHONY: license image .PHONY: license image
GOBIN := $(shell go env GOPATH)/bin
license: license:
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense) (which $(GOBIN)/addlicense || go get github.com/google/addlicense)
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . $(GOBIN)/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
all: license all: license

View File

@@ -21,8 +21,8 @@ generate:
(cd image && GOBIN=$(GOBIN) go generate ./...) (cd image && GOBIN=$(GOBIN) go generate ./...)
license: license:
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense) (which $(GOBIN)/addlicense || go get github.com/google/addlicense)
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . $(GOBIN)/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
tidy: tidy:
(cd image && go mod tidy) (cd image && go mod tidy)

View File

@@ -21,8 +21,8 @@ generate:
(cd image && GOBIN=$(GOBIN) go generate ./...) (cd image && GOBIN=$(GOBIN) go generate ./...)
license: license:
(which $(GOPATH)/bin/addlicense || go get github.com/google/addlicense) (which $(GOBIN)/addlicense || go get github.com/google/addlicense)
$(GOPATH)/bin/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE . $(GOBIN)/addlicense -y 2019 -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
tidy: tidy:
(cd image && go mod tidy) (cd image && go mod tidy)

View File

@@ -5,8 +5,21 @@
set -e set -e
# run all tests for kyaml and related commands # run all tests for kyaml and related commands
targets="kyaml cmd/config cmd/kubectl functions/examples/injection-tshirt-sizes functions/examples/template-go-nginx functions/examples/template-heredoc-cockroachdb functions/examples/validator-kubeval functions/examples/validator-resource-requests functions/examples/application-cr"
targets="
kyaml
cmd/config
cmd/kubectl
functions/examples/injection-tshirt-sizes
functions/examples/template-go-nginx
functions/examples/template-heredoc-cockroachdb
functions/examples/validator-kubeval
functions/examples/validator-resource-requests
functions/examples/application-cr
"
for target in $targets; do for target in $targets; do
echo "----- Making $target -----"
pushd . pushd .
cd $target cd $target
make all make all