Rename Deploy() to deploy()

This commit is contained in:
Lennart Kats 2023-06-18 20:03:38 +02:00
parent 6414701b1c
commit bdd21246e6
2 changed files with 6 additions and 6 deletions

View File

@ -16,11 +16,11 @@ var deployCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
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.
b.Config.Bundle.Lock.Force = force

View File

@ -14,7 +14,7 @@ import (
)
var runOptions run.Options
var deploy bool
var deployFlag bool
var noWait bool
var runCmd = &cobra.Command{
@ -26,8 +26,8 @@ var runCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
b := bundle.Get(cmd.Context())
if deploy {
err := Deploy(cmd, b)
if deployFlag {
err := deploy(cmd, b)
if err != nil {
return err
}
@ -104,7 +104,7 @@ var runCmd = &cobra.Command{
func init() {
runOptions.Define(runCmd.Flags())
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(&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.")