update micro deps to v2
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
+14
-7
@@ -1,26 +1,33 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli"
|
||||
"strings"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-phoenix/pkg/command"
|
||||
"github.com/owncloud/ocis-phoenix/pkg/flagset"
|
||||
"github.com/owncloud/ocis-pkg/conversions"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// PhoenixCommand is the entrypoint for the phoenix command.
|
||||
func PhoenixCommand(cfg *config.Config) cli.Command {
|
||||
return cli.Command{
|
||||
func PhoenixCommand(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "phoenix",
|
||||
Usage: "Start phoenix server",
|
||||
Category: "Extensions",
|
||||
Flags: flagset.ServerWithConfig(cfg.Phoenix),
|
||||
Action: func(c *cli.Context) error {
|
||||
if c.String("web-config-apps") != "" {
|
||||
cfg.Phoenix.Phoenix.Config.Apps = conversions.StringToSliceString(c.String("web-config-apps"), ",")
|
||||
Before: func(c *cli.Context) error {
|
||||
if cfg.HTTP.Root != "/" {
|
||||
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
|
||||
}
|
||||
|
||||
cfg.Phoenix.Phoenix.Config.Apps = c.StringSlice("web-config-app")
|
||||
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
|
||||
scfg := configurePhoenix(cfg)
|
||||
|
||||
return cli.HandleAction(
|
||||
|
||||
Reference in New Issue
Block a user