You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mg/cmd/dev.go
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,6 @@ func init() {
39
39
40
40
devCmd.AddCommand(devCmdUp)
41
41
devCmdUp.Flags().StringVarP(¶ms.NameSpace, "namespace", "n", "", "namespace to work on, if not supplied it will use current active namespace.")
42
-
devCmdUp.Flags().StringVar(¶ms.SourceRef, "ref", "", "use for overriding source ref or branch ref in buildconfig.")
43
42
devCmdUp.Flags().StringSliceVar(&CVars, "cvars", []string{}, "Slice of key=value pairs, seperated by ,")
44
43
devCmdUp.Flags().StringVar(¶ms.PropertiesFile, "cvfile", "", "Property file with component configuration values. Can be generated with \"mg generate properties\" command.)")
45
44
devCmdUp.Flags().StringVar(&OName, "name", "", "Overrides name of application.")
@@ -59,6 +58,7 @@ func init() {
59
58
devCmdDown.Flags().StringVar(&OName, "name", "", "Overrides name of application.")
60
59
61
60
devCmd.AddCommand(devCmdBuild)
61
+
devCmdBuild.Flags().StringVar(¶ms.SourceRef, "ref", "master", "Specify the git ref or branch ref to build.")
62
62
devCmdBuild.Flags().StringVarP(¶ms.NameSpace, "namespace", "n", "", "namespace to work on, if not supplied it will use current active namespace.")
63
63
devCmdBuild.Flags().BoolVar(¶ms.LocalBuild, "local", false, "Builds application from src in current (.) direcotry.")
64
64
}
@@ -110,6 +110,17 @@ var devCmdBuild = &cobra.Command{
110
110
mg:=metagraf.Parse(args[0])
111
111
bc:=mg.Name(OName, Version)
112
112
113
+
FlagPassingHack()
114
+
modules.NameSpace=params.NameSpace
115
+
116
+
// Remove RepSecRef from generated BuildConfig if --local argument is provided.
0 commit comments