@@ -15,9 +15,6 @@ BUILD_PLATFORMS ?= linux/amd64,linux/arm64,linux/arm/v7
1515# Allows for defining additional Go test args, e.g. '-tags integration'.
1616GO_TEST_ARGS ?= -race
1717
18- # Defines whether cosign verification should be skipped.
19- SKIP_COSIGN_VERIFICATION ?= false
20-
2118# Directory with versioned, downloaded things
2219CACHE := cache
2320
@@ -37,16 +34,8 @@ BUILD_DIR := $(REPOSITORY_ROOT)/build
3734# each fuzzer should run for.
3835FUZZ_TIME ?= 1m
3936
40- ifeq ($(shell uname -s) ,Darwin)
41- GO_STATIC_FLAGS =-ldflags "-s -w" -tags 'netgo,osusergo,static_build'
42- endif
43-
44- ifeq ($(shell uname -s) ,Linux)
45- GO_STATIC_FLAGS=-ldflags "-s -w" -tags 'netgo,osusergo,static_build'
46- endif
47-
4837# API (doc) generation utilities
49- CONTROLLER_GEN_VERSION ?= v0.16.1
38+ CONTROLLER_GEN_VERSION ?= v0.19.0
5039GEN_API_REF_DOCS_VERSION ?= e327d0730470cbd61b06300f81c5fcf91c23c113
5140
5241# If gobin not set, create one on ./build and add to path.
@@ -103,15 +92,10 @@ ${CACHE}/imagepolicies_${REFLECTOR_VER}.yaml:
10392 curl -s --fail https://raw.githubusercontent.com/fluxcd/image-reflector-controller/${REFLECTOR_VER} /config/crd/bases/image.toolkit.fluxcd.io_imagepolicies.yaml \
10493 -o ${CACHE} /imagepolicies_${REFLECTOR_VER} .yaml
10594
106- check-deps :
107- ifeq ($(shell uname -s) ,Darwin)
108- if ! command -v pkg-config &> /dev/null; then echo "pkg-config is required"; exit 1; fi
109- endif
110-
11195KUBEBUILDER_ASSETS? ="$(shell $(ENVTEST ) --arch=$(ENVTEST_ARCH ) use -i $(ENVTEST_KUBERNETES_VERSION ) --bin-dir=$(ENVTEST_ASSETS_DIR ) -p path) "
11296test : tidy test-api test_deps generate fmt vet manifests api-docs install-envtest # # Run tests
11397 KUBEBUILDER_ASSETS=$(KUBEBUILDER_ASSETS ) \
114- go test $(GO_STATIC_FLAGS ) $( GO_TEST_ARGS ) ./... -coverprofile cover.out
98+ go test $(GO_TEST_ARGS ) ./... -coverprofile cover.out
11599
116100test-api : # # Run api tests
117101 cd api; go test $(GO_TEST_ARGS ) ./... -coverprofile cover.out
@@ -120,7 +104,7 @@ manager: generate fmt vet ## Build manager binary
120104 go build -o $(BUILD_DIR ) /bin/manager ./main.go
121105
122106run : generate fmt vet manifests # Run against the configured Kubernetes cluster in ~/.kube/config
123- go run $( GO_STATIC_FLAGS ) ./main.go --log-level=${LOG_LEVEL} --log-encoding=console
107+ go run ./main.go --log-level=${LOG_LEVEL} --log-encoding=console
124108
125109install : manifests # # Install CRDs into a cluster
126110 kustomize build config/crd | kubectl apply -f -
@@ -146,8 +130,8 @@ api-docs: gen-crd-api-reference-docs ## Generate API reference documentation
146130 $(GEN_CRD_API_REFERENCE_DOCS ) -api-dir=./api/v1beta2 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/v1beta2/image-automation.md
147131
148132tidy : # # Run go mod tidy
149- cd api; rm -f go.sum; go mod tidy -compat=1.24
150- rm -f go.sum; go mod tidy -compat=1.24
133+ cd api; rm -f go.sum; go mod tidy -compat=1.25
134+ rm -f go.sum; go mod tidy -compat=1.25
151135
152136fmt : # # Run go fmt against code
153137 go fmt ./...
@@ -236,9 +220,6 @@ rm -rf $$TMP_DIR ;\
236220}
237221endef
238222
239- update-attributions :
240- ./hack/update-attributions.sh
241-
242223verify :
243224ifneq (, $(shell git status --porcelain --untracked-files=no) )
244225 @{ \
0 commit comments