mirror of https://github.com/databricks/cli.git
Rename Deploy() to deploy()
This commit is contained in:
parent
6414701b1c
commit
bdd21246e6
|
@ -16,11 +16,11 @@ var deployCmd = &cobra.Command{
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
b := bundle.Get(cmd.Context())
|
b := bundle.Get(cmd.Context())
|
||||||
|
|
||||||
return Deploy(cmd, b)
|
return deploy(cmd, b)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func Deploy(cmd *cobra.Command, b *bundle.Bundle) error {
|
func deploy(cmd *cobra.Command, b *bundle.Bundle) error {
|
||||||
// If `--force` is specified, force acquisition of the deployment lock.
|
// If `--force` is specified, force acquisition of the deployment lock.
|
||||||
b.Config.Bundle.Lock.Force = force
|
b.Config.Bundle.Lock.Force = force
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var runOptions run.Options
|
var runOptions run.Options
|
||||||
var deploy bool
|
var deployFlag bool
|
||||||
var noWait bool
|
var noWait bool
|
||||||
|
|
||||||
var runCmd = &cobra.Command{
|
var runCmd = &cobra.Command{
|
||||||
|
@ -26,8 +26,8 @@ var runCmd = &cobra.Command{
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
b := bundle.Get(cmd.Context())
|
b := bundle.Get(cmd.Context())
|
||||||
|
|
||||||
if deploy {
|
if deployFlag {
|
||||||
err := Deploy(cmd, b)
|
err := deploy(cmd, b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ var runCmd = &cobra.Command{
|
||||||
func init() {
|
func init() {
|
||||||
runOptions.Define(runCmd.Flags())
|
runOptions.Define(runCmd.Flags())
|
||||||
rootCmd.AddCommand(runCmd)
|
rootCmd.AddCommand(runCmd)
|
||||||
runCmd.Flags().BoolVar(&deploy, "deploy", false, "Call deploy before run.")
|
runCmd.Flags().BoolVar(&deployFlag, "deploy", false, "Call deploy before run.")
|
||||||
runCmd.Flags().BoolVar(&force, "force", false, "Force acquisition of deployment lock.")
|
runCmd.Flags().BoolVar(&force, "force", false, "Force acquisition of deployment lock.")
|
||||||
runCmd.Flags().BoolVar(&noWait, "no-wait", false, "Don't wait for the run to complete.")
|
runCmd.Flags().BoolVar(&noWait, "no-wait", false, "Don't wait for the run to complete.")
|
||||||
runCmd.Flags().StringVar(&computeID, "compute", "", "Override compute in the deployment with the given compute ID.")
|
runCmd.Flags().StringVar(&computeID, "compute", "", "Override compute in the deployment with the given compute ID.")
|
||||||
|
|
Loading…
Reference in New Issue