hub/commands/update.go

25 строки
342 B
Go
Исходник Обычный вид История

2013-12-18 22:56:46 +04:00
package commands
import (
2013-12-19 00:22:59 +04:00
"github.com/jingweno/gh/utils"
2013-12-18 22:56:46 +04:00
"os"
)
var cmdUpdate = &Command{
Run: update,
Usage: "update",
Short: "Update gh",
2013-12-19 00:43:01 +04:00
Long: `Update gh to the latest version.
2013-12-18 22:56:46 +04:00
Examples:
git update
`,
}
func update(cmd *Command, args *Args) {
2013-12-19 23:30:29 +04:00
updater := NewUpdater()
err := updater.Update()
2013-12-19 00:22:59 +04:00
utils.Check(err)
2013-12-18 22:56:46 +04:00
os.Exit(0)
}