Fix prefix bug in copier.

This commit is contained in:
monopole
2021-02-08 14:39:25 -08:00
parent 94d06e1e18
commit 1df430255a
5 changed files with 32 additions and 24 deletions

View File

@@ -5,13 +5,6 @@ MYGOBIN := $(shell go env GOPATH)/bin
export PATH := $(MYGOBIN):$(PATH)
.PHONY: generate license fix vet fmt test lint tidy clean
all: license fix vet fmt test lint tidy
fix:
go fix ./...
fmt:
go fmt ./...
$(MYGOBIN)/addlicense:
go get github.com/google/addlicense
@@ -25,25 +18,38 @@ $(MYGOBIN)/k8scopy:
$(MYGOBIN)/stringer:
go get golang.org/x/tools/cmd/stringer
all: license fix vet fmt test lint tidy
k8sGenDir := yaml/internal/k8sgen/pkg
generate: $(MYGOBIN)/stringer $(MYGOBIN)/k8scopy
go generate ./...
clean:
rm -rf yaml/internal/k8sgen/pkg
rm -rf $(k8sGenDir)
lint: $(MYGOBIN)/golangci-lint
$(MYGOBIN)/golangci-lint \
--skip-dirs $(k8sGenDir) \
run ./...
license: $(MYGOBIN)/addlicense
$(MYGOBIN)/addlicense -c "The Kubernetes Authors." -f LICENSE_TEMPLATE .
$(MYGOBIN)/addlicense \
-y 2021 \
-c "The Kubernetes Authors." \
-f LICENSE_TEMPLATE .
test: generate
go test -cover ./...
fix:
go fix ./...
fmt:
go fmt ./...
tidy:
go mod tidy
lint: $(MYGOBIN)/golangci-lint
$(MYGOBIN)/golangci-lint \
--skip-dirs yaml/internal/k8sgen/pkg \
run ./...
test:
go test -cover ./...
vet:
go vet ./...

View File

@@ -3,5 +3,5 @@
// All code below this directory is generated.
// See {repo}/cmd/k8scopy/main.go for more info.
//go:generate k8scopy k8scopy.yaml
//go:generate k8scopy k8scopy.yaml yaml
package k8sgen