abra/cli/cli.go
decentral1se 53576dc916
All checks were successful
continuous-integration/drone/push Build is passing
Revert "style: add missing type marker"
This reverts commit e064f187305616c01683659beaba24628b97d8b9.

As discussed, this is explicitly using a type shorthand which is all
good.
2021-07-21 13:32:16 +02:00

40 lines
619 B
Go

package cli
import (
"fmt"
"os"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
func RunApp(version, commit string) {
app := &cli.App{
Name: "abra",
Usage: "The Co-op Cloud utility belt 🎩🐇",
Version: fmt.Sprintf("%s-%s", version, commit[:7]),
Commands: []*cli.Command{
AppCommand,
ServerCommand,
RecipeCommand,
VersionCommand,
},
Flags: []cli.Flag{
EnvFlag,
StackFlag,
SkipCheckFlag,
SkipUpdateFlag,
VerboseFlag,
BranchFlag,
NoPromptFlag,
DebugFlag,
ContextFlag,
},
}
err := app.Run(os.Args)
if err != nil {
logrus.Fatal(err)
}
}