Skip to content

Commit

Permalink
BOT: run 'make upgrade-klone' and 'make generate'
Browse files Browse the repository at this point in the history
Signed-off-by: cert-manager-bot <cert-manager-bot@users.noreply.github.com>
  • Loading branch information
cert-manager-bot committed Jul 17, 2024
1 parent 30d41d4 commit 7a605f5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 46 deletions.
18 changes: 9 additions & 9 deletions klone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,45 @@ targets:
- folder_name: boilerplate
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/boilerplate
- folder_name: cert-manager
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/cert-manager
- folder_name: executable
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/executable
- folder_name: generate-verify
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/generate-verify
- folder_name: go
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/go
- folder_name: help
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/help
- folder_name: klone
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/klone
- folder_name: repository-base
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/repository-base
- folder_name: tools
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 140169ff41d87878ddb0fdfd5ecf567aee25d992
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_path: modules/tools
51 changes: 14 additions & 37 deletions make/_shared/tools/00_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ for_each_kv = $(foreach item,$2,$(eval $(call $1,$(word 1,$(subst =, ,$(item))),
# variables: https://stackoverflow.com/questions/54726457
export PATH := $(CURDIR)/$(bin_dir)/tools:$(PATH)

CTR=docker
CTR ?= docker
.PHONY: __require-ctr
ifneq ($(shell command -v $(CTR) >/dev/null || echo notfound),)
__require-ctr:
@:$(error "$(CTR) (or set CTR to a docker-compatible tool)")
endif
NEEDS_CTR = __require-ctr

tools :=
# https://github.com/helm/helm/releases
Expand Down Expand Up @@ -241,8 +247,13 @@ detected_vendoring := $(findstring vendor-go,$(MAKECMDGOALS))$(shell [ -f $(bin_
export VENDOR_GO ?= $(detected_vendoring)

ifeq ($(VENDOR_GO),)
.PHONY: __require-go
ifneq ($(shell command -v go >/dev/null || echo notfound),)
__require-go:
@:$(error "$(GO) (or run 'make vendor-go')")
endif
GO := go
NEEDS_GO := #
NEEDS_GO = __require-go
else
export GOROOT := $(CURDIR)/$(bin_dir)/tools/goroot
export PATH := $(CURDIR)/$(bin_dir)/tools/goroot/bin:$(PATH)
Expand Down Expand Up @@ -604,10 +615,7 @@ $(DOWNLOAD_DIR)/tools/preflight@$(PREFLIGHT_VERSION)_linux_$(HOST_ARCH): | $(DOW
missing=$(shell (command -v curl >/dev/null || echo curl) \
&& (command -v sha256sum >/dev/null || command -v shasum >/dev/null || echo sha256sum) \
&& (command -v git >/dev/null || echo git) \
&& (command -v rsync >/dev/null || echo rsync) \
&& ([ -n "$(findstring vendor-go,$(MAKECMDGOALS),)" ] \
|| command -v $(GO) >/dev/null || echo "$(GO) (or run 'make vendor-go')") \
&& (command -v $(CTR) >/dev/null || echo "$(CTR) (or set CTR to a docker-compatible tool)"))
&& (command -v rsync >/dev/null || echo rsync))
ifneq ($(missing),)
$(error Missing required tools: $(missing))
endif
Expand All @@ -616,34 +624,3 @@ endif
## Download and setup all tools
## @category [shared] Tools
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
tools-learn-sha: | $(bin_dir)
rm -rf ./$(bin_dir)/
mkdir -p ./$(bin_dir)/scratch/
$(eval export LEARN_FILE=$(CURDIR)/$(bin_dir)/scratch/learn_tools_file)
echo -n "" > "$(LEARN_FILE)"

HOST_OS=linux HOST_ARCH=amd64 $(MAKE) tools
HOST_OS=linux HOST_ARCH=arm64 $(MAKE) tools
HOST_OS=darwin HOST_ARCH=amd64 $(MAKE) tools
HOST_OS=darwin HOST_ARCH=arm64 $(MAKE) tools

HOST_OS=linux HOST_ARCH=amd64 $(MAKE) vendor-go
HOST_OS=linux HOST_ARCH=arm64 $(MAKE) vendor-go
HOST_OS=darwin HOST_ARCH=amd64 $(MAKE) vendor-go
HOST_OS=darwin HOST_ARCH=arm64 $(MAKE) vendor-go

while read p; do \
$(sed_inplace) "$$p" $(self_file); \
done <"$(LEARN_FILE)"

0 comments on commit 7a605f5

Please sign in to comment.