Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ CONTROLLER_TOOLS_VERSION ?= {{ .ControllerToolsVersion }}
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
ENVTEST_VERSION ?= $(shell go list -m -f "{{ "{{ .Version }}" }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ "{{ .Version }}" }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
ENVTEST_K8S_VERSION ?= $(shell go list -m k8s.io/api | \
awk '{if ($$NF ~ /^v[0-9]/) {gsub(/^v/,"",$$NF); split($$NF,v,"."); major=v[1]; minor=v[2]; if (major==0) major=1; printf "%d.%d", major, minor} else {print "Error: Cannot detect version. Set ENVTEST_K8S_VERSION manually." > "/dev/stderr"; exit 1}}')
GOLANGCI_LINT_VERSION ?= {{ .GolangciLintVersion }}

.PHONY: kustomize
Expand Down
3 changes: 2 additions & 1 deletion testdata/project-v4-multigroup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ CONTROLLER_TOOLS_VERSION ?= v0.19.0
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
ENVTEST_K8S_VERSION ?= $(shell go list -m k8s.io/api | \
awk '{if ($$NF ~ /^v[0-9]/) {gsub(/^v/,"",$$NF); split($$NF,v,"."); major=v[1]; minor=v[2]; if (major==0) major=1; printf "%d.%d", major, minor} else {print "Error: Cannot detect version. Set ENVTEST_K8S_VERSION manually." > "/dev/stderr"; exit 1}}')
GOLANGCI_LINT_VERSION ?= v2.4.0

.PHONY: kustomize
Expand Down
3 changes: 2 additions & 1 deletion testdata/project-v4-with-plugins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ CONTROLLER_TOOLS_VERSION ?= v0.19.0
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
ENVTEST_K8S_VERSION ?= $(shell go list -m k8s.io/api | \
awk '{if ($$NF ~ /^v[0-9]/) {gsub(/^v/,"",$$NF); split($$NF,v,"."); major=v[1]; minor=v[2]; if (major==0) major=1; printf "%d.%d", major, minor} else {print "Error: Cannot detect version. Set ENVTEST_K8S_VERSION manually." > "/dev/stderr"; exit 1}}')
GOLANGCI_LINT_VERSION ?= v2.4.0

.PHONY: kustomize
Expand Down
3 changes: 2 additions & 1 deletion testdata/project-v4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ CONTROLLER_TOOLS_VERSION ?= v0.19.0
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
ENVTEST_K8S_VERSION ?= $(shell go list -m k8s.io/api | \
awk '{if ($$NF ~ /^v[0-9]/) {gsub(/^v/,"",$$NF); split($$NF,v,"."); major=v[1]; minor=v[2]; if (major==0) major=1; printf "%d.%d", major, minor} else {print "Error: Cannot detect version. Set ENVTEST_K8S_VERSION manually." > "/dev/stderr"; exit 1}}')
GOLANGCI_LINT_VERSION ?= v2.4.0

.PHONY: kustomize
Expand Down