grim/convey

Remove deprecated command line options

2019-08-02, Gary Kramlich
9b89adb9ebd0
Parents aa829bda9740
Children a1710d61939a
Remove deprecated command line options
  • +2 -0
    ChangeLog
  • +0 -44
    main.go
  • --- a/ChangeLog Fri Aug 02 22:52:05 2019 -0500
    +++ b/ChangeLog Fri Aug 02 22:57:41 2019 -0500
    @@ -30,6 +30,8 @@
    * Deprecated docker/import and docker/export and replaced them with
    convey/import and convey/export.
    * Only create a network if we have a run task.
    + * Removed deprecated command line options: --graphviz, --list-environment,
    + --list-meta-plans, --list-plans, --list-tasks, and --config.
    0.13.1: 20180114
    * Write warning, error, and fatal log messages to stderr. Fixed #156
    --- a/main.go Fri Aug 02 22:52:05 2019 -0500
    +++ b/main.go Fri Aug 02 22:57:41 2019 -0500
    @@ -57,14 +57,6 @@
    disableDeprecated = app.Flag("disable-deprecated", "Allow the use of deprecated features").Default("False").Bool()
    options = app.Flag("opt", "Options to pass to the config loader").Short('o').Strings()
    - // deprecated options
    - graphviz = app.Flag("graphviz", "Output a graphviz diagram of the config file").Short('g').Hidden().Default("False").Bool()
    - listEnvironment = app.Flag("list-environment", "List the environment variables that are available").Short('E').Hidden().Default("false").Bool()
    - listMetaPlans = app.Flag("list-meta-plans", "List the meta plans that are available").Short('M').Hidden().Default("false").Bool()
    - listPlans = app.Flag("list-plans", "List the plans that are available").Short('P').Hidden().Default("false").Bool()
    - listTasks = app.Flag("list-tasks", "List the supported tasks").Short('L').Hidden().Default("false").Bool()
    - showConfig = app.Flag("show-config", "Show a dump of the config file").Short('C').Hidden().Default("false").Bool()
    -
    // simple commands
    _ = app.Command("config", "Show a dump of the config file")
    _ = app.Command("environment", "List the environment variables that are available")
    @@ -114,38 +106,6 @@
    }
    }
    -// handleDeprecatedCommands will check deprecated command line flags and return
    -// the current command that they should run.
    -func handleDeprecatedCommands() string {
    - if *disableDeprecated {
    - return ""
    - }
    -
    - command := ""
    -
    - if *graphviz {
    - fmt.Printf("--graphviz is deprecated, use 'convey graphviz` instead")
    - command = "graphviz"
    - } else if *listEnvironment {
    - fmt.Printf("--list-environment is deprecated, use 'convey list environment` instead")
    - command = "list environment"
    - } else if *listMetaPlans {
    - fmt.Printf("--list-metaplans is deprecated, use `convey list metaplans` instead")
    - command = "list metaplans"
    - } else if *listPlans {
    - fmt.Printf("--list-plans is deprecated, use `convey list plans` instead")
    - command = "list plans"
    - } else if *listTasks {
    - fmt.Printf("--list-tasks is deprecated, use `convey list tasks` instead")
    - command = "list tasks"
    - } else if *showConfig {
    - fmt.Printf("--list-plans is deprecated, use `convey config` instead")
    - command = "config"
    - }
    -
    - return command
    -}
    -
    // resolvePlans will run through all of the plans in the config and resolve
    // their names via the loader.
    func resolvePlans(cfg *config.Config, loader config.Loader, rt *runtime.Runtime) []string {
    @@ -264,10 +224,6 @@
    return 1
    }
    - if commandOverride := handleDeprecatedCommands(); commandOverride != "" {
    - command = commandOverride
    - }
    -
    runner := determineRunner(command)
    if len(*planNames) == 0 {