1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 12:48:45 +00:00

Fix backward CRD group name

This commit is contained in:
Darren Shepherd
2017-11-13 14:49:28 -07:00
parent 4ab7475968
commit 62e4fa6ac7
23 changed files with 19 additions and 18 deletions

View File

@@ -12,14 +12,15 @@ import (
var (
basePackage = "github.com/rancher/types"
baseCattle = "client"
baseK8s = "apis"
)
func Generate(schemas *types.Schemas) {
version := getVersion(schemas)
groupParts := strings.Split(version.Group, ".")
group := strings.Split(version.Group, ".")[0]
cattleOutputPackage := path.Join(basePackage, baseCattle, groupParts[len(groupParts)-1], version.Version)
k8sOutputPackage := path.Join(basePackage, version.Group, version.Version)
cattleOutputPackage := path.Join(basePackage, baseCattle, group, version.Version)
k8sOutputPackage := path.Join(basePackage, baseK8s, version.Group, version.Version)
if err := generator.Generate(schemas, cattleOutputPackage, k8sOutputPackage); err != nil {
panic(err)