Improve cli env setup & running
This commit is contained in:
+3
-8
@@ -1,17 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/compose"
|
||||
"github.com/cortezaproject/corteza-server/pkg/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
c := compose.InitCompose()
|
||||
if err := c.Command(cli.Context()).Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
cfg := compose.Configure()
|
||||
cmd := cfg.MakeCLI(cli.Context())
|
||||
cli.HandleError(cmd.Execute())
|
||||
}
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/messaging"
|
||||
"github.com/cortezaproject/corteza-server/pkg/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
m := messaging.InitMessaging()
|
||||
if err := m.Command(cli.Context()).Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
cfg := messaging.Configure()
|
||||
cmd := cfg.MakeCLI(cli.Context())
|
||||
cli.HandleError(cmd.Execute())
|
||||
}
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/monolith"
|
||||
"github.com/cortezaproject/corteza-server/pkg/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
c := monolith.InitMonolith()
|
||||
if err := c.Command(cli.Context()).Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
cfg := monolith.Configure()
|
||||
cmd := cfg.MakeCLI(cli.Context())
|
||||
cli.HandleError(cmd.Execute())
|
||||
}
|
||||
|
||||
+3
-8
@@ -1,17 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/pkg/cli"
|
||||
"github.com/cortezaproject/corteza-server/system"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s := system.InitSystem()
|
||||
if err := s.Command(cli.Context()).Execute(); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
cfg := system.Configure()
|
||||
cmd := cfg.MakeCLI(cli.Context())
|
||||
cli.HandleError(cmd.Execute())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user