Code Review
/
ealt-edge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Modified to support Prod and Dev Mode"
[ealt-edge.git]
/
ocd
/
cli
/
ealt
/
cmd
/
init
/
all.go
diff --git
a/ocd/cli/ealt/cmd/init/all.go
b/ocd/cli/ealt/cmd/init/all.go
index
1654a16
..
061c629
100644
(file)
--- a/
ocd/cli/ealt/cmd/init/all.go
+++ b/
ocd/cli/ealt/cmd/init/all.go
@@
-16,8
+16,8
@@
limitations under the License.
package init
import (
package init
import (
-
setup "ealt/cmd/setup"
setup "ealt/cmd/setup"
+ "strings"
"github.com/spf13/cobra"
)
"github.com/spf13/cobra"
)
@@
-29,12
+29,21
@@
func NewAllCommand() *cobra.Command {
Short: "Install Complete EALT Deployment Environment",
Long: `Install Complete EALT Deployment Environment`,
RunE: func(cmd *cobra.Command, args []string) error {
Short: "Install Complete EALT Deployment Environment",
Long: `Install Complete EALT Deployment Environment`,
RunE: func(cmd *cobra.Command, args []string) error {
- err := setup.EaltInstall("all")
+ setupModeFlag := strings.ToLower(cmd.Flag("mode").Value.String())
+ var err error
+ if setupModeFlag == "dev" {
+ err = setup.EaltInstall("all")
+ } else if setupModeFlag == "prod" {
+ err = setup.EaltInstall("secure")
+ }
if err != nil {
return err
}
return nil
},
}
if err != nil {
return err
}
return nil
},
}
+ cmd.Flags().StringP("mode", "m", "dev", "Deployment Mode")
+ //cmd.MarkFlagRequired("mode")
+
return cmd
}
return cmd
}