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
Modified to support Prod and Dev Mode
[ealt-edge.git]
/
ocd
/
cli
/
ealt
/
cmd
/
init
/
edge.go
diff --git
a/ocd/cli/ealt/cmd/init/edge.go
b/ocd/cli/ealt/cmd/init/edge.go
index
8cce554
..
3b16f93
100644
(file)
--- a/
ocd/cli/ealt/cmd/init/edge.go
+++ b/
ocd/cli/ealt/cmd/init/edge.go
@@
-17,6
+17,7
@@
package init
import (
"fmt"
import (
"fmt"
+ "strings"
setup "ealt/cmd/setup"
setup "ealt/cmd/setup"
@@
-30,12
+31,19
@@
func NewEdgeCommand() *cobra.Command {
Long: `Command to Install Edge Node only For Example : ealt init edge`,
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("Installation of Edge components")
Long: `Command to Install Edge Node only For Example : ealt init edge`,
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("Installation of Edge components")
- err := setup.EaltInstall("edge")
+ setupModeFlag := strings.ToLower(cmd.Flag("mode").Value.String())
+ var err error
+ if setupModeFlag == "dev" {
+ err = setup.EaltInstall("edge")
+ } else if setupModeFlag == "prod" {
+ err = setup.EaltInstall("ssledge")
+ }
if err != nil {
return err
}
return nil
},
}
if err != nil {
return err
}
return nil
},
}
+ cmd.Flags().StringP("mode", "m", "dev", "Deployment Mode")
return cmd
}
return cmd
}