mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 10:15:22 +00:00
refactor: fix generate-kustimize-builtin-plugins, add diff checker on generate-kustomize-builtin-plugins, add go work sync on presubmit check, add generate-kustomize-builtin-plugins on presubmit check
This commit is contained in:
12
Makefile
12
Makefile
@@ -112,7 +112,9 @@ prow-presubmit-check: \
|
||||
test-go-mod \
|
||||
build-non-plugin-all \
|
||||
test-examples-kustomize-against-HEAD \
|
||||
test-examples-kustomize-against-latest-release
|
||||
test-examples-kustomize-against-latest-release \
|
||||
workspace-sync \
|
||||
generate-kustomize-builtin-plugins
|
||||
|
||||
.PHONY: license
|
||||
license: $(MYGOBIN)/addlicense
|
||||
@@ -181,7 +183,15 @@ test-examples-kustomize-against-HEAD: $(MYGOBIN)/kustomize $(MYGOBIN)/mdrip
|
||||
test-examples-kustomize-against-latest-release: $(MYGOBIN)/mdrip
|
||||
./hack/testExamplesAgainstKustomize.sh v5@$(LATEST_RELEASE)
|
||||
|
||||
.PHONY: generate-kustomize-builtin-plugins
|
||||
generate-kustomize-builtin-plugins:
|
||||
$(MAKE) -f Makefile-plugin.mk
|
||||
|
||||
# Pushes dependencies in the go.work file back to go.mod files of each workspace module.
|
||||
.PHONY: workspace-sync
|
||||
workspace sync:
|
||||
go work sync
|
||||
|
||||
# --- Cleanup targets ---
|
||||
.PHONY: clean
|
||||
clean: clean-kustomize-external-go-plugin uninstall-tools
|
||||
|
||||
@@ -91,7 +91,25 @@ $(pGen)/%.go: $(MYGOBIN)/pluginator $(MYGOBIN)/goimports
|
||||
|
||||
# Target is for debugging.
|
||||
.PHONY: generate-kustomize-builtin-plugins
|
||||
generate-kustomize-builtin-plugins: $(builtinplugins)
|
||||
generate-kustomize-builtin-plugins: $(builtplugins)
|
||||
for plugin in $(abspath $(wildcard $(pSrc)/*)); do \
|
||||
echo "generating $${plugin} ..."; \
|
||||
set -e; \
|
||||
cd $${plugin}; \
|
||||
go generate pluginator .; \
|
||||
done; \
|
||||
cd ../../../; \
|
||||
make no-diff \
|
||||
|
||||
.PHONY: no-diff
|
||||
no-diff: $(builtplugins)
|
||||
for file in $(abspath $(builtinplugins)); do \
|
||||
echo "Checking for diff... $${file}" ; \
|
||||
set -e ; \
|
||||
if [ "`git diff $${file} | wc -c`" -gt 0 ]; then\
|
||||
echo "Error(1): diff found on $${file}"; exit 1; \
|
||||
fi \
|
||||
done
|
||||
|
||||
.PHONY: build-kustomize-external-go-plugin
|
||||
build-kustomize-external-go-plugin:
|
||||
|
||||
Reference in New Issue
Block a user