NewDevCmd creates a new devspace dev command
(f factory.Factory, globalFlags *flags.GlobalFlags, rawConfig *RawConfig)
| 9 | |
| 10 | // NewDevCmd creates a new devspace dev command |
| 11 | func NewDevCmd(f factory.Factory, globalFlags *flags.GlobalFlags, rawConfig *RawConfig) *cobra.Command { |
| 12 | cmd := &RunPipelineCmd{ |
| 13 | GlobalFlags: globalFlags, |
| 14 | SkipPushLocalKubernetes: true, |
| 15 | Pipeline: "dev", |
| 16 | } |
| 17 | |
| 18 | var pipeline *latest.Pipeline |
| 19 | if rawConfig != nil && rawConfig.Config != nil && rawConfig.Config.Pipelines != nil { |
| 20 | pipeline = rawConfig.Config.Pipelines["dev"] |
| 21 | } |
| 22 | devCmd := &cobra.Command{ |
| 23 | Use: "dev", |
| 24 | Short: "Starts the development mode", |
| 25 | Long: ` |
| 26 | ####################################################### |
| 27 | ################### devspace dev ###################### |
| 28 | ####################################################### |
| 29 | Starts your project in development mode |
| 30 | #######################################################`, |
| 31 | RunE: func(cobraCmd *cobra.Command, args []string) error { |
| 32 | return cmd.Run(cobraCmd, args, f, "devCommand") |
| 33 | }, |
| 34 | } |
| 35 | cmd.AddPipelineFlags(f, devCmd, pipeline) |
| 36 | return devCmd |
| 37 | } |
no test coverage detected