mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
separate generate plugins and check diff step
This commit is contained in:
3
Makefile
3
Makefile
@@ -110,6 +110,7 @@ prow-presubmit-check: \
|
|||||||
install-tools \
|
install-tools \
|
||||||
workspace-sync \
|
workspace-sync \
|
||||||
generate-kustomize-builtin-plugins \
|
generate-kustomize-builtin-plugins \
|
||||||
|
builtin-plugins-diff \
|
||||||
test-unit-kustomize-plugins \
|
test-unit-kustomize-plugins \
|
||||||
test-go-mod \
|
test-go-mod \
|
||||||
build-non-plugin-all \
|
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.
|
# Pushes dependencies in the go.work file back to go.mod files of each workspace module.
|
||||||
.PHONY: workspace-sync
|
.PHONY: workspace-sync
|
||||||
workspace sync:
|
workspace-sync:
|
||||||
go work sync
|
go work sync
|
||||||
./hack/doGoMod.sh tidy
|
./hack/doGoMod.sh tidy
|
||||||
|
|
||||||
|
|||||||
@@ -97,13 +97,12 @@ generate-kustomize-builtin-plugins: $(builtplugins)
|
|||||||
set -e; \
|
set -e; \
|
||||||
cd $${plugin}; \
|
cd $${plugin}; \
|
||||||
go generate pluginator .; \
|
go generate pluginator .; \
|
||||||
done; \
|
done
|
||||||
cd ../../../; \
|
|
||||||
make no-diff \
|
|
||||||
|
|
||||||
# Check for diff, if diff is found, throw error code 1
|
# Check for diff by comparing current revision of generated plugins on HEAD and newly generated plugins on local branch,
|
||||||
.PHONY: no-diff
|
# If diff is found, throw error code 1
|
||||||
no-diff: $(builtplugins)
|
.PHONY: builtin-plugins-diff
|
||||||
|
builtin-plugins-diff: $(builtplugins)
|
||||||
for file in $(abspath $(builtinplugins)); do \
|
for file in $(abspath $(builtinplugins)); do \
|
||||||
echo "Checking for diff... $${file}" ; \
|
echo "Checking for diff... $${file}" ; \
|
||||||
set -e ; \
|
set -e ; \
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ module sigs.k8s.io/kustomize/plugin/builtin/patchtransformer
|
|||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/stretchr/testify v1.8.1
|
||||||
gopkg.in/evanphx/json-patch.v5 v5.6.0
|
gopkg.in/evanphx/json-patch.v5 v5.6.0
|
||||||
sigs.k8s.io/kustomize/api v0.14.0
|
sigs.k8s.io/kustomize/api v0.14.0
|
||||||
sigs.k8s.io/kustomize/kyaml v0.14.3
|
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/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // 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
|
github.com/xlab/treeprint v1.2.0 // indirect
|
||||||
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
|
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
|
||||||
golang.org/x/sys v0.8.0 // indirect
|
golang.org/x/sys v0.8.0 // indirect
|
||||||
|
|||||||
Reference in New Issue
Block a user