Skip to content

Commit

Permalink
separate generate plugins and check diff step
Browse files Browse the repository at this point in the history
  • Loading branch information
antoooks committed Sep 28, 2023
1 parent 9e101ee commit d91ea65
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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

Expand Down
11 changes: 5 additions & 6 deletions Makefile-plugins.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 ; \
Expand Down
2 changes: 1 addition & 1 deletion plugin/builtin/patchtransformer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d91ea65

Please sign in to comment.