MCPcopy Create free account
hub / github.com/devspace-sh/devspace / NewDevCmd

Function NewDevCmd

cmd/dev.go:11–37  ·  view source on GitHub ↗

NewDevCmd creates a new devspace dev command

(f factory.Factory, globalFlags *flags.GlobalFlags, rawConfig *RawConfig)

Source from the content-addressed store, hash-verified

9
10// NewDevCmd creates a new devspace dev command
11func 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#######################################################
29Starts 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}

Callers 1

BuildRootFunction · 0.85

Calls 2

RunMethod · 0.95
AddPipelineFlagsMethod · 0.95

Tested by

no test coverage detected