forked from jenkins-x-plugins/jx-gitops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kpt.go
26 lines (24 loc) · 724 Bytes
/
kpt.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package kpt
import (
"github.com/jenkins-x/jx-gitops/pkg/cmd/kpt/recreate"
"github.com/jenkins-x/jx-gitops/pkg/cmd/kpt/update"
"github.com/jenkins-x/jx-helpers/v3/pkg/cobras"
"github.com/jenkins-x/jx-logging/v3/pkg/log"
"github.com/spf13/cobra"
)
// NewCmdHelm creates the new command
func NewCmdKpt() *cobra.Command {
command := &cobra.Command{
Use: "kpt",
Short: "Commands for working with kpt packages",
Run: func(command *cobra.Command, args []string) {
err := command.Help()
if err != nil {
log.Logger().Errorf(err.Error())
}
},
}
command.AddCommand(cobras.SplitCommand(recreate.NewCmdKptRecreate()))
command.AddCommand(cobras.SplitCommand(update.NewCmdKptUpdate()))
return command
}