abra/cli/cli.go

48 lines
964 B
Go
Raw Normal View History

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 command-line utility belt 🎩🐇
____ ____ _ _
/ ___|___ ___ _ __ / ___| | ___ _ _ __| |
| | / _ \ _____ / _ \| '_ \ | | | |/ _ \| | | |/ _' |
| |__| (_) |_____| (_) | |_) | | |___| | (_) | |_| | (_| |
\____\___/ \___/| .__/ \____|_|\___/ \__,_|\__,_|
|_|
`,
Version: fmt.Sprintf("%s-%s", version, commit[:7]),
Commands: []*cli.Command{
AppCommand,
ServerCommand,
2021-07-21 08:58:13 +00:00
RecipeCommand,
2021-07-20 21:59:47 +00:00
VersionCommand,
},
Flags: []cli.Flag{
EnvFlag,
StackFlag,
SkipCheckFlag,
SkipUpdateFlag,
VerboseFlag,
BranchFlag,
NoPromptFlag,
DebugFlag,
ContextFlag,
},
}
err := app.Run(os.Args)
if err != nil {
logrus.Fatal(err)
}
}