NewUpgradeCmd creates a new upgrade command
()
| 16 | |
| 17 | // NewUpgradeCmd creates a new upgrade command |
| 18 | func NewUpgradeCmd() *cobra.Command { |
| 19 | cmd := &UpgradeCmd{} |
| 20 | |
| 21 | upgradeCmd := &cobra.Command{ |
| 22 | Use: "upgrade", |
| 23 | Short: "Upgrades the DevSpace CLI to the newest version", |
| 24 | Long: ` |
| 25 | ####################################################### |
| 26 | ################## devspace upgrade ################### |
| 27 | ####################################################### |
| 28 | Upgrades the DevSpace CLI to the newest version |
| 29 | #######################################################`, |
| 30 | Args: cobra.NoArgs, |
| 31 | RunE: func(cobraCmd *cobra.Command, args []string) error { |
| 32 | plugin.SetPluginCommand(cobraCmd, args) |
| 33 | return cmd.Run() |
| 34 | }, |
| 35 | } |
| 36 | |
| 37 | upgradeCmd.Flags().StringVar(&cmd.Version, "version", "", "The version to update devspace to. Defaults to the latest stable version available") |
| 38 | return upgradeCmd |
| 39 | } |
| 40 | |
| 41 | // Run executes the command logic |
| 42 | func (cmd *UpgradeCmd) Run() error { |
no test coverage detected