Skip to content

Commit

Permalink
Merge pull request #9 from cert-manager/self-upgrade
Browse files Browse the repository at this point in the history
[CI] Merge self-upgrade into main
  • Loading branch information
jetstack-bot committed Jan 24, 2024
2 parents b6aceeb + c34d1dd commit 2f75014
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 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: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/boilerplate
- folder_name: cert-manager
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/cert-manager
- folder_name: executable
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/executable
- folder_name: generate-verify
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/generate-verify
- folder_name: help
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/help
- folder_name: klone
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/klone
- folder_name: repository-base
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/repository-base
- folder_name: tools
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: edeba4963e470a9f5e55ab1947aa15f5bdb2a2c3
repo_hash: 43dfc77ac0dc7b08fbeddef87a153b40b364929b
repo_path: modules/tools
7 changes: 5 additions & 2 deletions make/_shared/executable/01_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

exe_platforms := all
exe_operating_systems ?= darwin,linux,windows
exe_architectures ?= amd64,arm,arm64,ppc64le,s390x

ifndef bin_dir
$(error bin_dir is not set)
Expand Down Expand Up @@ -110,7 +111,9 @@ define template_for_target
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .ldflags[0] = "-s")' | \
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .ldflags[1] = "-w")' | \
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .ldflags[2] = "$(go_$(1)_ldflags)")' | \
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .gobinary = "$(GO)")' |
$(YQ) 'with(.builds[]; select(.id == "$(1)") | .gobinary = "$(GO)")' | \
os=$(exe_operating_systems) $(YQ) 'with(.builds[]; select(.id == "$(1)") | .goos = (env(os) | split(",")))' | \
archs=$(exe_architectures) $(YQ) 'with(.builds[]; select(.id == "$(1)") | .goarch = (env(archs) | split(",")))' |
endef

## Build the go source for release. This will build the source
Expand Down
8 changes: 8 additions & 0 deletions make/_shared/tools/00_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ KUBEBUILDER_ASSETS_VERSION=1.28.3
TOOLS += etcd=$(KUBEBUILDER_ASSETS_VERSION)
TOOLS += kube-apiserver=$(KUBEBUILDER_ASSETS_VERSION)

# Additional tools can be defined to reuse the tooling in this file
ADDITIONAL_TOOLS ?=
TOOLS += $(ADDITIONAL_TOOLS)

# https://go.dev/dl/
VENDORED_GO_VERSION := 1.21.6

Expand Down Expand Up @@ -280,6 +284,10 @@ GO_DEPENDENCIES += defaulter-gen=k8s.io/code-generator/cmd/defaulter-gen
GO_DEPENDENCIES += conversion-gen=k8s.io/code-generator/cmd/conversion-gen
GO_DEPENDENCIES += helm-tool=github.com/cert-manager/helm-tool

# Additional Go dependencies can be defined to re-use the tooling in this file
ADDITIONAL_GO_DEPENDENCIES ?=
GO_DEPENDENCIES += $(ADDITIONAL_GO_DEPENDENCIES)

define go_dependency
$$(bin_dir)/downloaded/tools/$1@$($(call UC,$1)_VERSION)_%: | $$(NEEDS_GO) $$(bin_dir)/downloaded/tools
GOWORK=off GOBIN=$$(CURDIR)/$$(dir $$@) $$(GO) install $2@$($(call UC,$1)_VERSION)
Expand Down

0 comments on commit 2f75014

Please sign in to comment.