github.com/dcarley/cf-cli@v6.24.1-0.20170220111324-4225ff346898+incompatible/command/v2/update_buildpack_command.go (about)

     1  package v2
     2  
     3  import (
     4  	"os"
     5  
     6  	flags "github.com/jessevdk/go-flags"
     7  
     8  	"code.cloudfoundry.org/cli/cf/cmd"
     9  	"code.cloudfoundry.org/cli/command"
    10  	"code.cloudfoundry.org/cli/command/flag"
    11  )
    12  
    13  type UpdateBuildpackCommand struct {
    14  	RequiredArgs    flag.Buildpack `positional-args:"yes"`
    15  	Disable         bool           `long:"disable" description:"Disable the buildpack from being used for staging"`
    16  	Enable          bool           `long:"enable" description:"Enable the buildpack to be used for staging"`
    17  	Order           int            `short:"i" description:"The order in which the buildpacks are checked during buildpack auto-detection"`
    18  	Lock            bool           `long:"lock" description:"Lock the buildpack to prevent updates"`
    19  	Path            flags.Filename `short:"p" description:"Path to directory or zip file"`
    20  	Unlock          bool           `long:"unlock" description:"Unlock the buildpack to enable updates"`
    21  	usage           interface{}    `usage:"CF_NAME update-buildpack BUILDPACK [-p PATH] [-i POSITION] [--enable|--disable] [--lock|--unlock]\n\nTIP:\n   Path should be a zip file, a url to a zip file, or a local directory. Position is a positive integer, sets priority, and is sorted from lowest to highest."`
    22  	relatedCommands interface{}    `related_commands:"buildpacks, rename-buildpack"`
    23  }
    24  
    25  func (_ UpdateBuildpackCommand) Setup(config command.Config, ui command.UI) error {
    26  	return nil
    27  }
    28  
    29  func (_ UpdateBuildpackCommand) Execute(args []string) error {
    30  	cmd.Main(os.Getenv("CF_TRACE"), os.Args)
    31  	return nil
    32  }