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: jetstack-bot <jetstack-bot@users.noreply.github.com>
  • Loading branch information
jetstack-bot committed Feb 6, 2024
1 parent c42c489 commit 882de9c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
16 changes: 8 additions & 8 deletions klone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ targets:
- folder_name: boilerplate
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/boilerplate
- folder_name: cert-manager
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/cert-manager
- folder_name: executable
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/executable
- folder_name: generate-verify
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/generate-verify
- folder_name: help
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/help
- folder_name: klone
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/klone
- folder_name: repository-base
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/repository-base
- folder_name: tools
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: ffff9fc8a6472655604ca453b48753ffd27fc840
repo_hash: 8ecd0620d9aa0eeb3c6a964b6e2f0a5d8e3de655
repo_path: modules/tools
6 changes: 4 additions & 2 deletions make/_shared/executable/01_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,26 @@ ARGS ?= # default empty
## Any Go workfile is ignored.
## @category [shared] Build
$(run_targets): run-%: | $(NEEDS_GO)
cd $(go_$*_mod_dir) && \
GOWORK=off \
CGO_ENABLED=$(CGO_ENABLED) \
GOEXPERIMENT=$(GOEXPERIMENT) \
$(GO) run \
-ldflags '$(go_$*_ldflags)' \
$(go_$*_source_path) $(ARGS)
$(go_$*_main_dir) $(ARGS)

## Build the go source locally for development/ testing
## on the local platform. Any Go workfile is ignored.
## @category [shared] Build
$(build_targets): $(bin_dir)/bin/%: FORCE | $(NEEDS_GO)
cd $(go_$*_mod_dir) && \
GOWORK=off \
CGO_ENABLED=$(CGO_ENABLED) \
GOEXPERIMENT=$(GOEXPERIMENT) \
$(GO) build \
-ldflags '$(go_$*_ldflags)' \
-o $@ \
$(go_$*_source_path)
$(go_$*_main_dir)

define template_for_target
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .binary = "$(1)")' | \
Expand Down
6 changes: 4 additions & 2 deletions make/_shared/generate-verify/02_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
.PHONY: generate
## Generate all generate targets.
## @category [shared] Generate/ Verify
generate: $(shared_generate_targets)
generate: $$(shared_generate_targets)

verify_script := $(dir $(lastword $(MAKEFILE_LIST)))/util/verify.sh

# Run the supplied make target argument in a temporary workspace and diff the results.
verify-%: FORCE
$(verify_script) $(MAKE) -s $*

verify_generated_targets = $(shared_generate_targets:%=verify-%)

.PHONY: verify
## Verify code and generate targets.
## @category [shared] Generate/ Verify
verify: $(shared_generate_targets:%=verify-%) $(shared_verify_targets)
verify: $$(verify_generated_targets) $$(shared_verify_targets)
@echo "The following targets create temporary files in the current directory, that is why they have to be run last:"
$(MAKE) noop $(shared_verify_targets_dirty)
2 changes: 1 addition & 1 deletion make/_shared/tools/00_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ TOOLS += goreleaser=v1.23.0
# https://pkg.go.dev/github.com/anchore/syft/cmd/syft?tab=versions
TOOLS += syft=v0.100.0
# https://github.com/cert-manager/helm-tool
TOOLS += helm-tool=v0.2.3
TOOLS += helm-tool=v0.3.0

# https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions
K8S_CODEGEN_VERSION=v0.29.1
Expand Down

0 comments on commit 882de9c

Please sign in to comment.