Skip to content

Commit d91ea65

Browse files
committed
separate generate plugins and check diff step
1 parent 9e101ee commit d91ea65

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ prow-presubmit-check: \
110110
install-tools \
111111
workspace-sync \
112112
generate-kustomize-builtin-plugins \
113+
builtin-plugins-diff \
113114
test-unit-kustomize-plugins \
114115
test-go-mod \
115116
build-non-plugin-all \
@@ -185,7 +186,7 @@ test-examples-kustomize-against-latest-release: $(MYGOBIN)/mdrip
185186

186187
# Pushes dependencies in the go.work file back to go.mod files of each workspace module.
187188
.PHONY: workspace-sync
188-
workspace sync:
189+
workspace-sync:
189190
go work sync
190191
./hack/doGoMod.sh tidy
191192

Makefile-plugins.mk

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,12 @@ generate-kustomize-builtin-plugins: $(builtplugins)
9797
set -e; \
9898
cd $${plugin}; \
9999
go generate pluginator .; \
100-
done; \
101-
cd ../../../; \
102-
make no-diff \
100+
done
103101

104-
# Check for diff, if diff is found, throw error code 1
105-
.PHONY: no-diff
106-
no-diff: $(builtplugins)
102+
# Check for diff by comparing current revision of generated plugins on HEAD and newly generated plugins on local branch,
103+
# If diff is found, throw error code 1
104+
.PHONY: builtin-plugins-diff
105+
builtin-plugins-diff: $(builtplugins)
107106
for file in $(abspath $(builtinplugins)); do \
108107
echo "Checking for diff... $${file}" ; \
109108
set -e ; \

plugin/builtin/patchtransformer/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module sigs.k8s.io/kustomize/plugin/builtin/patchtransformer
33
go 1.20
44

55
require (
6+
github.com/stretchr/testify v1.8.1
67
gopkg.in/evanphx/json-patch.v5 v5.6.0
78
sigs.k8s.io/kustomize/api v0.14.0
89
sigs.k8s.io/kustomize/kyaml v0.14.3
@@ -26,7 +27,6 @@ require (
2627
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
2728
github.com/pkg/errors v0.9.1 // indirect
2829
github.com/pmezard/go-difflib v1.0.0 // indirect
29-
github.com/stretchr/testify v1.8.1 // indirect
3030
github.com/xlab/treeprint v1.2.0 // indirect
3131
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
3232
golang.org/x/sys v0.8.0 // indirect

0 commit comments

Comments
 (0)