github.com/jacobsoderblom/buffalo@v0.11.0/buffalo/cmd/update.go (about)

     1  package cmd
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"github.com/gobuffalo/buffalo/buffalo/cmd/updater"
     7  	"github.com/spf13/cobra"
     8  )
     9  
    10  // updateCmd represents the info command
    11  var updateCmd = &cobra.Command{
    12  	Use:   "update",
    13  	Short: fmt.Sprintf("will attempt to upgrade a Buffalo application to version %s", Version),
    14  	RunE: func(cmd *cobra.Command, args []string) error {
    15  		updater.Version = Version
    16  		return updater.Run()
    17  	},
    18  }
    19  
    20  func init() {
    21  	decorate("update", RootCmd)
    22  	RootCmd.AddCommand(updateCmd)
    23  }