Skip to content

Commit b3e4081

Browse files
Merge pull request #94 from cert-manager/self-upgrade-main
[CI] Merge self-upgrade-main into main
2 parents d2e9d4d + c1b0541 commit b3e4081

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ formatters:
8989
sections:
9090
- standard # Standard section: captures all standard packages.
9191
- default # Default section: contains all imports that could not be matched to another section type.
92-
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
92+
- prefix(github.com/cert-manager/csi-lib) # Custom section: groups all imports with the specified Prefix.
9393
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
9494
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
9595
exclusions:

klone.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,55 @@ targets:
99
- folder_name: boilerplate
1010
repo_url: https://github.com/cert-manager/makefile-modules.git
1111
repo_ref: main
12-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
12+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
1313
repo_path: modules/boilerplate
1414
- folder_name: cert-manager
1515
repo_url: https://github.com/cert-manager/makefile-modules.git
1616
repo_ref: main
17-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
17+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
1818
repo_path: modules/cert-manager
1919
- folder_name: controller-gen
2020
repo_url: https://github.com/cert-manager/makefile-modules.git
2121
repo_ref: main
22-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
22+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
2323
repo_path: modules/controller-gen
2424
- folder_name: generate-verify
2525
repo_url: https://github.com/cert-manager/makefile-modules.git
2626
repo_ref: main
27-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
27+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
2828
repo_path: modules/generate-verify
2929
- folder_name: go
3030
repo_url: https://github.com/cert-manager/makefile-modules.git
3131
repo_ref: main
32-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
32+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
3333
repo_path: modules/go
3434
- folder_name: help
3535
repo_url: https://github.com/cert-manager/makefile-modules.git
3636
repo_ref: main
37-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
37+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
3838
repo_path: modules/help
3939
- folder_name: kind
4040
repo_url: https://github.com/cert-manager/makefile-modules.git
4141
repo_ref: main
42-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
42+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
4343
repo_path: modules/kind
4444
- folder_name: klone
4545
repo_url: https://github.com/cert-manager/makefile-modules.git
4646
repo_ref: main
47-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
47+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
4848
repo_path: modules/klone
4949
- folder_name: oci-build
5050
repo_url: https://github.com/cert-manager/makefile-modules.git
5151
repo_ref: main
52-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
52+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
5353
repo_path: modules/oci-build
5454
- folder_name: repository-base
5555
repo_url: https://github.com/cert-manager/makefile-modules.git
5656
repo_ref: main
57-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
57+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
5858
repo_path: modules/repository-base
5959
- folder_name: tools
6060
repo_url: https://github.com/cert-manager/makefile-modules.git
6161
repo_ref: main
62-
repo_hash: e8fadfa09b889ff15b0bd05e00fa62c971a61a7a
62+
repo_hash: 587c086c2847f3d1a6f4814dfd73d9af472a4826
6363
repo_path: modules/tools

make/_shared/go/.golangci.override.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ formatters:
7272
sections:
7373
- standard # Standard section: captures all standard packages.
7474
- default # Default section: contains all imports that could not be matched to another section type.
75-
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
75+
- prefix({{REPO-NAME}}) # Custom section: groups all imports with the specified Prefix.
7676
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
7777
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
7878
exclusions:

make/_shared/go/01_mod.mk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ ifndef bin_dir
1616
$(error bin_dir is not set)
1717
endif
1818

19+
ifndef repo_name
20+
$(error repo_name is not set)
21+
endif
22+
23+
ifndef golangci_lint_config
24+
$(error golangci_lint_config is not set)
25+
endif
26+
1927
golangci_lint_override := $(dir $(lastword $(MAKEFILE_LIST)))/.golangci.override.yaml
2028

2129
.PHONY: go-workspace
@@ -101,7 +109,6 @@ verify-govulncheck: | $(NEEDS_GOVULNCHECK)
101109

102110
endif # govulncheck_skip
103111

104-
ifdef golangci_lint_config
105112

106113
.PHONY: generate-golangci-lint-config
107114
## Generate a golangci-lint configuration file
@@ -115,6 +122,7 @@ generate-golangci-lint-config: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(bin_dir)/s
115122
cp $(golangci_lint_config) $(bin_dir)/scratch/golangci-lint.yaml.tmp
116123
$(YQ) -i 'del(.linters.enable)' $(bin_dir)/scratch/golangci-lint.yaml.tmp
117124
$(YQ) eval-all -i '. as $$item ireduce ({}; . * $$item)' $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_override)
125+
$(YQ) -i '(.. | select(tag == "!!str")) |= sub("{{REPO-NAME}}", "$(repo_name)")' $(bin_dir)/scratch/golangci-lint.yaml.tmp
118126
mv $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_config)
119127

120128
shared_generate_targets += generate-golangci-lint-config
@@ -150,5 +158,3 @@ fix-golangci-lint: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(NEEDS_GCI) $(bin_dir)/
150158
popd >/dev/null; \
151159
echo ""; \
152160
done
153-
154-
endif

0 commit comments

Comments
 (0)