Skip to content

Commit 204bd2f

Browse files
Merge pull request #153 from cert-manager/self-upgrade-main
[CI] Merge self-upgrade-main into main
2 parents 968f301 + 31b01a5 commit 204bd2f

File tree

2 files changed

+48
-13
lines changed

2 files changed

+48
-13
lines changed

klone.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,65 +10,65 @@ targets:
1010
- folder_name: boilerplate
1111
repo_url: https://github.com/cert-manager/makefile-modules.git
1212
repo_ref: main
13-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
13+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
1414
repo_path: modules/boilerplate
1515
- folder_name: cert-manager
1616
repo_url: https://github.com/cert-manager/makefile-modules.git
1717
repo_ref: main
18-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
18+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
1919
repo_path: modules/cert-manager
2020
- folder_name: controller-gen
2121
repo_url: https://github.com/cert-manager/makefile-modules.git
2222
repo_ref: main
23-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
23+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
2424
repo_path: modules/controller-gen
2525
- folder_name: generate-verify
2626
repo_url: https://github.com/cert-manager/makefile-modules.git
2727
repo_ref: main
28-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
28+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
2929
repo_path: modules/generate-verify
3030
- folder_name: go
3131
repo_url: https://github.com/cert-manager/makefile-modules.git
3232
repo_ref: main
33-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
33+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
3434
repo_path: modules/go
3535
- folder_name: helm
3636
repo_url: https://github.com/cert-manager/makefile-modules.git
3737
repo_ref: main
38-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
38+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
3939
repo_path: modules/helm
4040
- folder_name: help
4141
repo_url: https://github.com/cert-manager/makefile-modules.git
4242
repo_ref: main
43-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
43+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
4444
repo_path: modules/help
4545
- folder_name: kind
4646
repo_url: https://github.com/cert-manager/makefile-modules.git
4747
repo_ref: main
48-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
48+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
4949
repo_path: modules/kind
5050
- folder_name: klone
5151
repo_url: https://github.com/cert-manager/makefile-modules.git
5252
repo_ref: main
53-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
53+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
5454
repo_path: modules/klone
5555
- folder_name: oci-build
5656
repo_url: https://github.com/cert-manager/makefile-modules.git
5757
repo_ref: main
58-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
58+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
5959
repo_path: modules/oci-build
6060
- folder_name: oci-publish
6161
repo_url: https://github.com/cert-manager/makefile-modules.git
6262
repo_ref: main
63-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
63+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
6464
repo_path: modules/oci-publish
6565
- folder_name: repository-base
6666
repo_url: https://github.com/cert-manager/makefile-modules.git
6767
repo_ref: main
68-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
68+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
6969
repo_path: modules/repository-base
7070
- folder_name: tools
7171
repo_url: https://github.com/cert-manager/makefile-modules.git
7272
repo_ref: main
73-
repo_hash: 96530a5ed1a52c40cdf6b2469ad49fa5a13ab7c0
73+
repo_hash: cb3ebf9f13251b918c162335069ad7a64f839438
7474
repo_path: modules/tools

make/_shared/go/01_mod.mk

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,41 @@ endif
2323
go_base_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base/
2424
golangci_lint_override := $(dir $(lastword $(MAKEFILE_LIST)))/.golangci.override.yaml
2525

26+
.PHONY: go-workspace
27+
go-workspace: export GOWORK?=$(abspath go.work)
28+
## Create a go.work file in the repository root (or GOWORK)
29+
##
30+
## @category Development
31+
go-workspace: | $(NEEDS_GO)
32+
@rm -f $(GOWORK)
33+
$(GO) work init
34+
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
35+
| while read d; do \
36+
target=$$(dirname $${d}); \
37+
$(GO) work use "$${target}"; \
38+
done
39+
40+
.PHONY: go-tidy
41+
## Alias for `make generate-go-mod-tidy`
42+
## @category [shared] Generate/ Verify
43+
go-tidy: generate-go-mod-tidy
44+
45+
.PHONY: generate-go-mod-tidy
46+
## Run `go mod tidy` on all Go modules
47+
## @category [shared] Generate/ Verify
48+
generate-go-mod-tidy: | $(NEEDS_GO)
49+
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
50+
| while read d; do \
51+
target=$$(dirname $${d}); \
52+
echo "Running 'go mod tidy' in directory '$${target}'"; \
53+
pushd "$${target}" >/dev/null; \
54+
$(GO) mod tidy || exit; \
55+
popd >/dev/null; \
56+
echo ""; \
57+
done
58+
59+
shared_generate_targets += generate-go-mod-tidy
60+
2661
.PHONY: generate-govulncheck
2762
## Generate base files in the repository
2863
## @category [shared] Generate/ Verify

0 commit comments

Comments
 (0)