From 07cbca3245df8532d05a0982fe42d697ed39ccf5 Mon Sep 17 00:00:00 2001 From: cert-manager-bot Date: Mon, 20 May 2024 01:08:58 +0000 Subject: [PATCH] BOT: run 'make upgrade-klone' and 'make generate' Signed-off-by: cert-manager-bot --- OWNERS_ALIASES | 1 + ....cert-manager.io_simpleclusterissuers.yaml | 2 +- ...testing.cert-manager.io_simpleissuers.yaml | 2 +- ...ng.cert-manager.io_testclusterissuers.yaml | 2 +- .../testing.cert-manager.io_testissuers.yaml | 2 +- klone.yaml | 24 +++---- make/_shared/cert-manager/00_mod.mk | 18 +++--- make/_shared/kind/00_mod.mk | 6 +- .../oci-build/image_tool/append_layers.go | 63 ++++++++++++------- .../repository-base/base/OWNERS_ALIASES | 1 + make/_shared/tools/00_mod.mk | 42 ++++++++----- 11 files changed, 97 insertions(+), 66 deletions(-) diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index 6d51f05..10d1279 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -11,3 +11,4 @@ aliases: - irbekrm - sgtcodfish - inteon + - thatsmrtalbot diff --git a/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml b/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml index cb8aee7..2be6306 100644 --- a/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml +++ b/examples/simple/deploy/crds/testing.cert-manager.io_simpleclusterissuers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: simpleclusterissuers.testing.cert-manager.io spec: group: testing.cert-manager.io diff --git a/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml b/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml index 21b5786..eb182b3 100644 --- a/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml +++ b/examples/simple/deploy/crds/testing.cert-manager.io_simpleissuers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: simpleissuers.testing.cert-manager.io spec: group: testing.cert-manager.io diff --git a/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml b/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml index 9519a8c..6490e52 100644 --- a/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml +++ b/internal/testapi/crds/testing.cert-manager.io_testclusterissuers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: testclusterissuers.testing.cert-manager.io spec: group: testing.cert-manager.io diff --git a/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml b/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml index 9a99a83..8ca95c1 100644 --- a/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml +++ b/internal/testapi/crds/testing.cert-manager.io_testissuers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: testissuers.testing.cert-manager.io spec: group: testing.cert-manager.io diff --git a/klone.yaml b/klone.yaml index 6be2fdf..bc1357a 100644 --- a/klone.yaml +++ b/klone.yaml @@ -9,60 +9,60 @@ targets: - folder_name: api-docs repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/api-docs - folder_name: boilerplate repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/boilerplate - folder_name: cert-manager repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/cert-manager - folder_name: controller-gen repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/controller-gen - folder_name: generate-verify repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/generate-verify - folder_name: go repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/go - folder_name: help repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/help - folder_name: kind repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/kind - folder_name: klone repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/klone - folder_name: oci-build repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/oci-build - folder_name: repository-base repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/repository-base - folder_name: tools repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: ed50ac284f8e2a389ee33d4dcb90eb4de108bb98 + repo_hash: d9d816ad61c9ca979f815cc993304f21aae5b394 repo_path: modules/tools diff --git a/make/_shared/cert-manager/00_mod.mk b/make/_shared/cert-manager/00_mod.mk index 0a61381..863508b 100644 --- a/make/_shared/cert-manager/00_mod.mk +++ b/make/_shared/cert-manager/00_mod.mk @@ -15,14 +15,14 @@ images_amd64 ?= images_arm64 ?= -cert_manager_version := v1.14.4 +cert_manager_version := v1.14.5 -images_amd64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:f84edf06327f84ed2ca056776659aa144cf3cc982c5403650c24553c5a44b03d -images_amd64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:8267563833c31cc428b9ae460b890d079a1da09a4d8d00ec299a47dd613fbd24 -images_amd64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:ba5469d1a77b1cb04a703199b0e69bc25644a00498adc3694a0369c87375b4ca -images_amd64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:2a1545099cf6386ab08e979a58a6280fe123d091c69f8222bfb22c597003a3f0 +images_amd64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:f37f460aaa7598ba251ff1cbe7438012fd56c4acc94be64245e8a836203c5542 +images_amd64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:6d9ebced61371cc903f7934690923034382456f3ce6e0fe2b692c40dbd67d523 +images_amd64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:ac34b1905a2ff20789fde27115d3e1aa7b3d09f57efba4e91ae2ba1744de4ad2 +images_amd64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:5c74e4e37586dc5c35442515f43ecf222e961b65e954798428ac9239408bc0f3 -images_arm64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:39a6e9e699b3dacb8b92538efbaff85c16d4b30343ebeaaf2f35772ff3cebf53 -images_arm64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:956aac21371499fdcc8811b4b5fc8e2e0d6e552b15723c783fe56270347fc9e0 -images_arm64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:8ea8462c1daa7604f4f2e71e0cdeef3dd5d7e0f04341982a05dc296299766126 -images_arm64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:f4cd54540f8813e63a2f53b5b210454ae2a5fe0949b9f55d8f1270162ebad9a8 +images_arm64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:96668890d162a743407c0ef14d7769e970aa16655959b5f5cab0c595167148fa +images_arm64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:719aec5d99e86377829261451985592bc4129c5ca8dcb7f20b32170742f2b29b +images_arm64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:874da5701a98e352fa28d88470671eb792a472737a3cf2b7ce9966817e962de8 +images_arm64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:35d35b325b980cc702324e52b443cc7eb1df7211ce4e8e91d96da4eff4b6c894 diff --git a/make/_shared/kind/00_mod.mk b/make/_shared/kind/00_mod.mk index 0619ec5..576d33e 100644 --- a/make/_shared/kind/00_mod.mk +++ b/make/_shared/kind/00_mod.mk @@ -15,7 +15,7 @@ images_amd64 ?= images_arm64 ?= -kind_k8s_version := v1.29.2 +kind_k8s_version := v1.29.4 # Goto https://github.com/kubernetes-sigs/kind/releases/tag/ and find the # multi-arch digest for the image you want to use. Then use crane to get the platform @@ -24,5 +24,5 @@ kind_k8s_version := v1.29.2 # crane digest --platform=linux/amd64 docker.io/kindest/node@$digest # crane digest --platform=linux/arm64 docker.io/kindest/node@$digest -images_amd64 += docker.io/kindest/node:$(kind_k8s_version)@sha256:acc9e82a5a5bd3dfccfd03117e9ef5f96b46108b55cd647fb5e7d0d1a35c9c6f -images_arm64 += docker.io/kindest/node:$(kind_k8s_version)@sha256:068aaa834c09ab60d925a8569c6b5f5b9cf46eccf670499176f3267f2ac3189c +images_amd64 += docker.io/kindest/node:$(kind_k8s_version)@sha256:ea40a6bd365a17f71fd3883a1d34a0791d7d6b0eb75832c6d85b6f2326827f1e +images_arm64 += docker.io/kindest/node:$(kind_k8s_version)@sha256:e63a7f74e80b746328fbaa70be406639d0c31c8c8cf0a3d57efdd23c64fe4bba diff --git a/make/_shared/oci-build/image_tool/append_layers.go b/make/_shared/oci-build/image_tool/append_layers.go index 0452829..3592c11 100644 --- a/make/_shared/oci-build/image_tool/append_layers.go +++ b/make/_shared/oci-build/image_tool/append_layers.go @@ -30,6 +30,7 @@ import ( "github.com/google/go-containerregistry/pkg/v1/match" "github.com/google/go-containerregistry/pkg/v1/mutate" "github.com/google/go-containerregistry/pkg/v1/tarball" + "github.com/google/go-containerregistry/pkg/v1/types" "github.com/spf13/cobra" ) @@ -45,16 +46,33 @@ var CommandAppendLayers = cobra.Command{ return } + path, err := layout.FromPath(oci) + must("could not load oci directory", err) + + index, err := path.ImageIndex() + must("could not load oci image index", err) + + indexMediaType, err := index.MediaType() + must("could not get image index media type", err) + + layerType := types.DockerLayer + if indexMediaType == types.OCIImageIndex { + layerType = types.OCILayer + } + layers := []v1.Layer{} for _, path := range extra { - layers = append(layers, loadLayerFromDirOrTarball(path)) + layers = append(layers, loadLayerFromDirOrTarball(path, layerType)) } - appendLayersToAllImages(oci, layers...) + index = appendLayersToImageIndex(index, layers) + + _, err = layout.Write(oci, index) + must("could not write image", err) }, } -func loadLayerFromDirOrTarball(path string) v1.Layer { +func loadLayerFromDirOrTarball(path string, mediaType types.MediaType) v1.Layer { stat, err := os.Stat(path) must("could not open directory or tarball", err) @@ -102,31 +120,24 @@ func loadLayerFromDirOrTarball(path string) v1.Layer { byts := buf.Bytes() - layer, err = tarball.LayerFromOpener(func() (io.ReadCloser, error) { - return io.NopCloser(bytes.NewReader(byts)), nil - }) + layer, err = tarball.LayerFromOpener( + func() (io.ReadCloser, error) { + return io.NopCloser(bytes.NewReader(byts)), nil + }, + tarball.WithMediaType(mediaType), + ) } else { - layer, err = tarball.LayerFromFile(path) + layer, err = tarball.LayerFromFile( + path, + tarball.WithMediaType(mediaType), + ) } must("could not open directory or tarball", err) return layer } -func appendLayersToAllImages(oci string, layers ...v1.Layer) { - path, err := layout.FromPath(oci) - must("could not load oci directory", err) - - index, err := path.ImageIndex() - must("could not load oci image index", err) - - index = appendLayersToImageIndex(index, layers) - - _, err = layout.Write(oci, index) - must("could not write image", err) -} - func appendLayersToImageIndex(index v1.ImageIndex, layers []v1.Layer) v1.ImageIndex { manifest, err := index.IndexManifest() must("could not load oci image manifest", err) @@ -145,11 +156,15 @@ func appendLayersToImageIndex(index v1.ImageIndex, layers []v1.Layer) v1.ImageIn digest, err := img.Digest() must("could not get image digest", err) + size, err := img.Size() + must("could not get image size", err) + slog.Info("appended layers to image", "old_digest", descriptor.Digest, "digest", digest, "platform", descriptor.Platform) index = mutate.RemoveManifests(index, match.Digests(descriptor.Digest)) descriptor.Digest = digest + descriptor.Size = size index = mutate.AppendManifests(index, mutate.IndexAddendum{ Add: img, Descriptor: descriptor, @@ -159,16 +174,20 @@ func appendLayersToImageIndex(index v1.ImageIndex, layers []v1.Layer) v1.ImageIn slog.Info("found image index", "digest", descriptor.Digest) child, err := index.ImageIndex(descriptor.Digest) - must("could not load oci image manifest", err) + must("could not load oci index manifest", err) child = appendLayersToImageIndex(child, layers) digest, err := child.Digest() - must("could not get image digest", err) + must("could not get index digest", err) + + size, err := child.Size() + must("could not get index size", err) index = mutate.RemoveManifests(index, match.Digests(descriptor.Digest)) descriptor.Digest = digest + descriptor.Size = size index = mutate.AppendManifests(index, mutate.IndexAddendum{ Add: child, Descriptor: descriptor, diff --git a/make/_shared/repository-base/base/OWNERS_ALIASES b/make/_shared/repository-base/base/OWNERS_ALIASES index 6d51f05..10d1279 100644 --- a/make/_shared/repository-base/base/OWNERS_ALIASES +++ b/make/_shared/repository-base/base/OWNERS_ALIASES @@ -11,3 +11,4 @@ aliases: - irbekrm - sgtcodfish - inteon + - thatsmrtalbot diff --git a/make/_shared/tools/00_mod.mk b/make/_shared/tools/00_mod.mk index 295b161..e9c7cfb 100644 --- a/make/_shared/tools/00_mod.mk +++ b/make/_shared/tools/00_mod.mk @@ -50,7 +50,7 @@ tools += helm=v3.14.4 # https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl tools += kubectl=v1.30.0 # https://github.com/kubernetes-sigs/kind/releases -tools += kind=v0.22.0 +tools += kind=v0.23.0 # https://www.vaultproject.io/downloads tools += vault=1.16.2 # https://github.com/Azure/azure-workload-identity/releases @@ -72,7 +72,7 @@ tools += rclone=v1.66.0 ### go packages # https://pkg.go.dev/sigs.k8s.io/controller-tools/cmd/controller-gen?tab=versions -tools += controller-gen=v0.14.0 +tools += controller-gen=v0.15.0 # https://pkg.go.dev/golang.org/x/tools/cmd/goimports?tab=versions tools += goimports=v0.20.0 # https://pkg.go.dev/github.com/google/go-licenses/licenses?tab=versions @@ -126,19 +126,22 @@ tools += operator-sdk=v1.34.1 tools += gh=v2.49.0 # https:///github.com/redhat-openshift-ecosystem/openshift-preflight/releases tools += preflight=1.9.2 -# https://github.com/daixiang0/gci/releases/ +# https://github.com/daixiang0/gci/releases tools += gci=v0.13.4 +# https://github.com/google/yamlfmt/releases +tools += yamlfmt=v0.12.1 # https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions -K8S_CODEGEN_VERSION := v0.29.3 +K8S_CODEGEN_VERSION := v0.30.1 tools += client-gen=$(K8S_CODEGEN_VERSION) tools += deepcopy-gen=$(K8S_CODEGEN_VERSION) tools += informer-gen=$(K8S_CODEGEN_VERSION) tools += lister-gen=$(K8S_CODEGEN_VERSION) tools += applyconfiguration-gen=$(K8S_CODEGEN_VERSION) -tools += openapi-gen=$(K8S_CODEGEN_VERSION) tools += defaulter-gen=$(K8S_CODEGEN_VERSION) tools += conversion-gen=$(K8S_CODEGEN_VERSION) +# https://github.com/kubernetes/kube-openapi +tools += openapi-gen=f0e62f92d13f418e2732b21c952fd17cab771c75 # https://github.com/kubernetes-sigs/kubebuilder/blob/tools-releases/build/cloudbuild_tools.yaml KUBEBUILDER_ASSETS_VERSION := 1.30.0 @@ -150,7 +153,7 @@ ADDITIONAL_TOOLS ?= tools += $(ADDITIONAL_TOOLS) # https://go.dev/dl/ -VENDORED_GO_VERSION := 1.22.2 +VENDORED_GO_VERSION := 1.22.3 # Print the go version which can be used in GH actions .PHONY: print-go-version @@ -315,9 +318,9 @@ go_dependencies += deepcopy-gen=k8s.io/code-generator/cmd/deepcopy-gen go_dependencies += informer-gen=k8s.io/code-generator/cmd/informer-gen go_dependencies += lister-gen=k8s.io/code-generator/cmd/lister-gen go_dependencies += applyconfiguration-gen=k8s.io/code-generator/cmd/applyconfiguration-gen -go_dependencies += openapi-gen=k8s.io/code-generator/cmd/openapi-gen go_dependencies += defaulter-gen=k8s.io/code-generator/cmd/defaulter-gen go_dependencies += conversion-gen=k8s.io/code-generator/cmd/conversion-gen +go_dependencies += openapi-gen=k8s.io/kube-openapi/cmd/openapi-gen go_dependencies += helm-tool=github.com/cert-manager/helm-tool go_dependencies += cmctl=github.com/cert-manager/cmctl/v2 go_dependencies += cmrel=github.com/cert-manager/release/cmd/cmrel @@ -326,6 +329,7 @@ go_dependencies += govulncheck=golang.org/x/vuln/cmd/govulncheck go_dependencies += operator-sdk=github.com/operator-framework/operator-sdk/cmd/operator-sdk go_dependencies += gh=github.com/cli/cli/v2/cmd/gh go_dependencies += gci=github.com/daixiang0/gci +go_dependencies += yamlfmt=github.com/google/yamlfmt/cmd/yamlfmt ################# # go build tags # @@ -359,10 +363,10 @@ $(call for_each_kv,go_dependency,$(go_dependencies)) # File downloads # ################## -go_linux_amd64_SHA256SUM=5901c52b7a78002aeff14a21f93e0f064f74ce1360fce51c6ee68cd471216a17 -go_linux_arm64_SHA256SUM=36e720b2d564980c162a48c7e97da2e407dfcc4239e1e58d98082dfa2486a0c1 -go_darwin_amd64_SHA256SUM=33e7f63077b1c5bce4f1ecadd4d990cf229667c40bfb00686990c950911b7ab7 -go_darwin_arm64_SHA256SUM=660298be38648723e783ba0398e90431de1cb288c637880cdb124f39bd977f0d +go_linux_amd64_SHA256SUM=8920ea521bad8f6b7bc377b4824982e011c19af27df88a815e3586ea895f1b36 +go_linux_arm64_SHA256SUM=6c33e52a5b26e7aa021b94475587fce80043a727a54ceb0eee2f9fc160646434 +go_darwin_amd64_SHA256SUM=610e48c1df4d2f852de8bc2e7fd2dc1521aac216f0c0026625db12f67f192024 +go_darwin_arm64_SHA256SUM=02abeab3f4b8981232237ebd88f0a9bad933bc9621791cd7720a9ca29eacbe9d .PRECIOUS: $(DOWNLOAD_DIR)/tools/go@$(VENDORED_GO_VERSION)_$(HOST_OS)_$(HOST_ARCH).tar.gz $(DOWNLOAD_DIR)/tools/go@$(VENDORED_GO_VERSION)_$(HOST_OS)_$(HOST_ARCH).tar.gz: | $(DOWNLOAD_DIR)/tools @@ -396,10 +400,10 @@ $(DOWNLOAD_DIR)/tools/kubectl@$(KUBECTL_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DO $(checkhash_script) $(outfile) $(kubectl_$(HOST_OS)_$(HOST_ARCH)_SHA256SUM); \ chmod +x $(outfile) -kind_linux_amd64_SHA256SUM=e4264d7ee07ca642fe52818d7c0ed188b193c214889dd055c929dbcb968d1f62 -kind_linux_arm64_SHA256SUM=4431805115da3b54290e3e976fe2db9a7e703f116177aace6735dfa1d8a4f3fe -kind_darwin_amd64_SHA256SUM=28a9f7ad7fd77922c639e21c034d0f989b33402693f4f842099cd9185b144d20 -kind_darwin_arm64_SHA256SUM=c8dd3b287965150ae4db668294edc48229116e95d94620c306d8fae932ee633f +kind_linux_amd64_SHA256SUM=1d86e3069ffbe3da9f1a918618aecbc778e00c75f838882d0dfa2d363bc4a68c +kind_linux_arm64_SHA256SUM=a416d6c311882337f0e56910e4a2e1f8c106ec70c22cbf0ac1dd8f33c1e284fe +kind_darwin_amd64_SHA256SUM=81c77f104b4b668812f7930659dc01ad88fa4d1cfc56900863eacdfb2731c457 +kind_darwin_arm64_SHA256SUM=68ec87c1e1ea2a708df883f4b94091150d19552d7b344e80ca59f449b301c2a0 .PRECIOUS: $(DOWNLOAD_DIR)/tools/kind@$(KIND_VERSION)_$(HOST_OS)_$(HOST_ARCH) $(DOWNLOAD_DIR)/tools/kind@$(KIND_VERSION)_$(HOST_OS)_$(HOST_ARCH): | $(DOWNLOAD_DIR)/tools @@ -615,6 +619,12 @@ tools: $(tools_paths) self_file := $(dir $(lastword $(MAKEFILE_LIST)))/00_mod.mk +# see https://stackoverflow.com/a/53408233 +sed_inplace := sed -i'' +ifeq ($(HOST_OS),darwin) + sed_inplace := sed -i '' +endif + # This target is used to learn the sha256sum of the tools. It is used only # in the makefile-modules repo, and should not be used in any other repo. .PHONY: tools-learn-sha @@ -635,5 +645,5 @@ tools-learn-sha: | $(bin_dir) HOST_OS=darwin HOST_ARCH=arm64 $(MAKE) vendor-go while read p; do \ - sed -i "$$p" $(self_file); \ + $(sed_inplace) "$$p" $(self_file); \ done <"$(LEARN_FILE)"