Pin tool versions with hack/go.mod (#5622)

* Pin tool versions with hack/go.mod

This change centralizes the tracking of versions for tools used for
development and testing. This way, the tools and all their
dependencies have their checksums stored in hack/go.sum, which
improves supply chain security.

* Workspace Sync & Tidy
This commit is contained in:
Karl Isenberg
2024-04-02 12:34:13 -07:00
committed by GitHub
parent 8fef99fa35
commit ed2ca23400
107 changed files with 3268 additions and 1084 deletions

View File

@@ -1,8 +1,6 @@
export KUSTOMIZE_ROOT ?= $(shell pwd | sed -E 's|(.*\/kustomize)/(.*)|\1|')
include $(KUSTOMIZE_ROOT)/Makefile-modules.mk
CONTROLLER_GEN_VERSION=v0.11.3
generate: $(MYGOBIN)/controller-gen $(MYGOBIN)/embedmd
go generate ./...
embedmd -w README.md
@@ -10,16 +8,9 @@ generate: $(MYGOBIN)/controller-gen $(MYGOBIN)/embedmd
build: generate
go build -v -o $(MYGOBIN)/app-fn cmd/main.go
$(MYGOBIN)/controller-gen:
go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION)
$(MYGOBIN)/embedmd:
go install github.com/campoy/embedmd@v1.0.0
.PHONY: example
example: build
$(MYGOBIN)/app-fn pkg/exampleapp/testdata/success/basic/config.yaml
test: generate
go test -v -timeout 45m -cover ./...