diff --git a/Makefile b/Makefile index ec77220d4a..20749393be 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,7 @@ prow-presubmit-check: \ install-tools \ workspace-sync \ generate-kustomize-builtin-plugins \ + builtin-plugins-diff \ test-unit-kustomize-plugins \ test-go-mod \ build-non-plugin-all \ @@ -185,7 +186,7 @@ test-examples-kustomize-against-latest-release: $(MYGOBIN)/mdrip # Pushes dependencies in the go.work file back to go.mod files of each workspace module. .PHONY: workspace-sync -workspace sync: +workspace-sync: go work sync ./hack/doGoMod.sh tidy diff --git a/Makefile-plugins.mk b/Makefile-plugins.mk index b0c4e144e4..a1edf91bdc 100644 --- a/Makefile-plugins.mk +++ b/Makefile-plugins.mk @@ -97,13 +97,12 @@ generate-kustomize-builtin-plugins: $(builtplugins) set -e; \ cd $${plugin}; \ go generate pluginator .; \ - done; \ - cd ../../../; \ - make no-diff \ + done -# Check for diff, if diff is found, throw error code 1 -.PHONY: no-diff -no-diff: $(builtplugins) +# Check for diff by comparing current revision of generated plugins on HEAD and newly generated plugins on local branch, +# If diff is found, throw error code 1 +.PHONY: builtin-plugins-diff +builtin-plugins-diff: $(builtplugins) for file in $(abspath $(builtinplugins)); do \ echo "Checking for diff... $${file}" ; \ set -e ; \ diff --git a/plugin/builtin/patchtransformer/go.mod b/plugin/builtin/patchtransformer/go.mod index d4f313b023..c182bdb28a 100644 --- a/plugin/builtin/patchtransformer/go.mod +++ b/plugin/builtin/patchtransformer/go.mod @@ -3,6 +3,7 @@ module sigs.k8s.io/kustomize/plugin/builtin/patchtransformer go 1.20 require ( + github.com/stretchr/testify v1.8.1 gopkg.in/evanphx/json-patch.v5 v5.6.0 sigs.k8s.io/kustomize/api v0.14.0 sigs.k8s.io/kustomize/kyaml v0.14.3 @@ -26,7 +27,6 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/testify v1.8.1 // indirect github.com/xlab/treeprint v1.2.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/sys v0.8.0 // indirect