Kinds: Fix kind publishing to the registry (#71041)

* Build: Generate core kinds in their own folder

* Build: Generate composable kinds within a package
This commit is contained in:
Kévin Gomez 2023-07-04 16:52:41 +02:00 committed by GitHub
parent db2770d992
commit 467c818c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}