mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 10:15:22 +00:00
Edit commentaries and ensure pluginator logic does not create diff
This commit is contained in:
@@ -89,7 +89,7 @@ $(pGen)/%.go: $(MYGOBIN)/pluginator $(MYGOBIN)/goimports
|
||||
$(MYGOBIN)/goimports -w $*.go \
|
||||
)
|
||||
|
||||
# Target is for debugging.
|
||||
# Generate builtin plugins
|
||||
.PHONY: generate-kustomize-builtin-plugins
|
||||
generate-kustomize-builtin-plugins: $(builtplugins)
|
||||
for plugin in $(abspath $(wildcard $(pSrc)/*)); do \
|
||||
@@ -101,7 +101,7 @@ generate-kustomize-builtin-plugins: $(builtplugins)
|
||||
cd ../../../; \
|
||||
make no-diff \
|
||||
|
||||
# Check for diff, if diff is found, throw error code 1 (subject to change based on discussion)
|
||||
# Check for diff, if diff is found, throw error code 1
|
||||
.PHONY: no-diff
|
||||
no-diff: $(builtplugins)
|
||||
for file in $(abspath $(builtinplugins)); do \
|
||||
|
||||
@@ -62,7 +62,6 @@ func ConvertToBuiltInPlugin() (retErr error) {
|
||||
w.write(
|
||||
fmt.Sprintf(
|
||||
"// pluginator %s\n", provenance.GetProvenance().Short()))
|
||||
w.write("\n")
|
||||
w.write("package " + packageForGeneratedCode)
|
||||
|
||||
pType := unknown
|
||||
@@ -73,6 +72,8 @@ func ConvertToBuiltInPlugin() (retErr error) {
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(l, "var "+konfig.PluginSymbol+" plugin") {
|
||||
// Hack to skip leading new line
|
||||
scanner.Scan()
|
||||
continue
|
||||
}
|
||||
if strings.Contains(l, " Transform(") {
|
||||
@@ -93,7 +94,7 @@ func ConvertToBuiltInPlugin() (retErr error) {
|
||||
}
|
||||
w.write("")
|
||||
w.write("func New" + root + "Plugin() resmap." + pType.String() + "Plugin {")
|
||||
w.write(" return &" + root + "Plugin{}")
|
||||
w.write(" return &" + root + "Plugin{}")
|
||||
w.write("}")
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user