From 467c818c47c706746cba93117b92267046bf5082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Gomez?= Date: Tue, 4 Jul 2023 16:52:41 +0200 Subject: [PATCH] Kinds: Fix kind publishing to the registry (#71041) * Build: Generate core kinds in their own folder * Build: Generate composable kinds within a package --- .github/workflows/scripts/kinds/verify-kinds.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/kinds/verify-kinds.go b/.github/workflows/scripts/kinds/verify-kinds.go index cf55c1c369e..0e8be14d836 100644 --- a/.github/workflows/scripts/kinds/verify-kinds.go +++ b/.github/workflows/scripts/kinds/verify-kinds.go @@ -351,7 +351,7 @@ func (j *kindregjenny) Generate(kind kindsys.Kind) (*codejen.File, error) { return nil, err } - path := filepath.Join(j.path, "next", "core", name+".cue") + path := filepath.Join(j.path, "next", "core", name, name+".cue") return codejen.NewFile(path, newKindBytes, j), nil } @@ -400,6 +400,8 @@ func (j *ckrJenny) Generate(k kindsys.Composable) (*codejen.File, error) { return nil, err } + newKindBytes = []byte(fmt.Sprintf("package kind\n\n%s", newKindBytes)) + return codejen.NewFile(filepath.Join(j.path, "next", "composable", name+".cue"), newKindBytes, j), nil }