refactor: drop unused flags for now
This commit is contained in:
parent
1961cdcfee
commit
5287f097e7
80
cli/cli.go
80
cli/cli.go
|
@ -6,7 +6,6 @@ import (
|
|||
"os"
|
||||
|
||||
"coopcloud.tech/abra/cli/app"
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/cli/recipe"
|
||||
"coopcloud.tech/abra/cli/server"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
@ -37,78 +36,6 @@ var DebugFlag = &cli.BoolFlag{
|
|||
Usage: "Show DEBUG messages",
|
||||
}
|
||||
|
||||
// NoPrompt stores the variable from NoPromptFlag.
|
||||
var NoPrompt bool
|
||||
|
||||
// NoPromptFlag turns on/off non-interactive mode where no user input is required.
|
||||
var NoPromptFlag = &cli.BoolFlag{
|
||||
Name: "no-prompt",
|
||||
Aliases: []string{"n"},
|
||||
Value: false,
|
||||
Destination: &NoPrompt,
|
||||
Usage: "Don't prompt for input and run non-interactively",
|
||||
}
|
||||
|
||||
// Env stores the variable from EnvFlag.
|
||||
var Env string
|
||||
|
||||
// EnvFlag takes a path to an env file to load variables from for the abra cli cmd.
|
||||
var EnvFlag = &cli.PathFlag{
|
||||
Name: "env",
|
||||
Aliases: []string{"e"},
|
||||
Value: "",
|
||||
Destination: &Env,
|
||||
Usage: "Environment variables to load",
|
||||
}
|
||||
|
||||
// Branch stores the variable from BranchFlag.
|
||||
var Branch string
|
||||
|
||||
// BranchFlag takes the name of the git branch to use in app cloning.
|
||||
var BranchFlag = &cli.StringFlag{
|
||||
Name: "branch",
|
||||
Aliases: []string{"b"},
|
||||
Value: "",
|
||||
Destination: &Branch,
|
||||
Usage: "Git branch to use while cloning app repos",
|
||||
}
|
||||
|
||||
// SkipUpdate stores the variable from SkipUpdateFlag
|
||||
var SkipUpdate bool
|
||||
|
||||
// SkipUpdateFlag allows users to skip updating recipe definitions.
|
||||
var SkipUpdateFlag = &cli.BoolFlag{
|
||||
Name: "skip-update",
|
||||
Aliases: []string{"U"},
|
||||
Value: false,
|
||||
Destination: &SkipUpdate,
|
||||
Usage: "Don't pull latest app definitions",
|
||||
}
|
||||
|
||||
// SkipCheck stores the variable from SkipCheckFlag.
|
||||
var SkipCheck bool
|
||||
|
||||
// SkipCheckFlag allows users to skip checking app vars.
|
||||
var SkipCheckFlag = &cli.BoolFlag{
|
||||
Name: "skip-check",
|
||||
Aliases: []string{"C"},
|
||||
Value: false,
|
||||
Destination: &SkipCheck,
|
||||
Usage: "Don't verify app variables",
|
||||
}
|
||||
|
||||
// Stack stores the variable from StackFlag.
|
||||
var Stack string
|
||||
|
||||
// StackFlag gets the name of the target stack to run commands against.
|
||||
var StackFlag = &cli.StringFlag{
|
||||
Name: "stack",
|
||||
Aliases: []string{"s"},
|
||||
Value: "",
|
||||
Destination: &Stack,
|
||||
Usage: "Name of the target stack",
|
||||
}
|
||||
|
||||
// RunApp runs CLI abra app.
|
||||
func RunApp(version, commit string) {
|
||||
app := &cli.App{
|
||||
|
@ -130,15 +57,8 @@ func RunApp(version, commit string) {
|
|||
VersionCommand,
|
||||
},
|
||||
Flags: []cli.Flag{
|
||||
EnvFlag,
|
||||
StackFlag,
|
||||
SkipCheckFlag,
|
||||
SkipUpdateFlag,
|
||||
VerboseFlag,
|
||||
BranchFlag,
|
||||
NoPromptFlag,
|
||||
DebugFlag,
|
||||
internal.ContextFlag,
|
||||
},
|
||||
Authors: []*cli.Author{
|
||||
&cli.Author{
|
||||
|
|
Loading…
Reference in New Issue