Skip to content

Commit

Permalink
pkg/generator: remove generator
Browse files Browse the repository at this point in the history
This commit removes generator, which was the old generator used by
the master branch. It is unnecessary now. This commit also removes
the `generate olm-catalog` command, as that was out of date,
depended on the generator, and will soon be completely rewritten
from scratch.
  • Loading branch information
AlexNPavel authored and Shawn Hurley committed Oct 16, 2018
1 parent 75ec259 commit 1d65f1a
Show file tree
Hide file tree
Showing 17 changed files with 122 additions and 2,557 deletions.
18 changes: 0 additions & 18 deletions commands/operator-sdk/cmd/cmdutil/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@
package cmdutil

import (
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"

"github.com/operator-framework/operator-sdk/pkg/generator"

yaml "gopkg.in/yaml.v2"
)

// OperatorType - the type of operator
Expand Down Expand Up @@ -70,19 +65,6 @@ func MustGetwd() string {
return wd
}

// GetConfig gets the values from ./config/config.yaml and parses them into a Config struct.
func GetConfig() *generator.Config {
c := &generator.Config{}
fp, err := ioutil.ReadFile(configYaml)
if err != nil {
log.Fatalf("failed to read config file %v: (%v)", configYaml, err)
}
if err = yaml.Unmarshal(fp, c); err != nil {
log.Fatalf("failed to unmarshal config file %v: (%v)", configYaml, err)
}
return c
}

// CheckAndGetCurrPkg checks if this project's repository path is rooted under $GOPATH and returns the current directory's import path
// e.g: "github.com/example-inc/app-operator"
func CheckAndGetCurrPkg() string {
Expand Down
3 changes: 3 additions & 0 deletions commands/operator-sdk/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ func NewGenerateCmd() *cobra.Command {
`,
}
cmd.AddCommand(generate.NewGenerateK8SCmd())
<<<<<<< HEAD
cmd.AddCommand(generate.NewGenerateOlmCatalogCmd())
cmd.AddCommand(generate.NewGenerateCrdCmd())
=======
>>>>>>> pkg/generator: remove generator
return cmd
}
94 changes: 0 additions & 94 deletions commands/operator-sdk/cmd/generate/olm_catalog.go

This file was deleted.

45 changes: 0 additions & 45 deletions pkg/generator/gen_config.go

This file was deleted.

35 changes: 0 additions & 35 deletions pkg/generator/gen_config_test.go

This file was deleted.

22 changes: 0 additions & 22 deletions pkg/generator/gen_deps.go

This file was deleted.

32 changes: 0 additions & 32 deletions pkg/generator/gen_deps_test.go

This file was deleted.

Loading

0 comments on commit 1d65f1a

Please sign in to comment.