mirror of https://github.com/databricks/cli.git
22 lines
440 B
Go
22 lines
440 B
Go
package labs
|
|
|
|
import (
|
|
"github.com/databricks/cli/cmd/labs/project"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func newUpgradeCommand() *cobra.Command {
|
|
return &cobra.Command{
|
|
Use: "upgrade NAME",
|
|
Args: cobra.ExactArgs(1),
|
|
Short: "Upgrades project",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
inst, err := project.NewUpgrader(cmd, args[0])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return inst.Upgrade(cmd.Context())
|
|
},
|
|
}
|
|
}
|