1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 05:00:54 +00:00
bee/version.go

36 lines
584 B
Go
Raw Normal View History

2014-05-16 17:37:45 +00:00
package main
import (
"fmt"
2014-05-16 17:53:42 +00:00
"log"
"os/exec"
2014-05-16 17:37:45 +00:00
"github.com/astaxie/beego"
)
var cmdVersion = &Command{
UsageLine: "version",
Short: "show the bee & beego version",
Long: `
show the bee & beego version
bee version
bee: 1.1.1
beego: 1.2
`,
}
func init() {
cmdVersion.Run = versionCmd
}
func versionCmd(cmd *Command, args []string) {
2014-05-16 17:53:42 +00:00
fmt.Println("bee :" + version)
fmt.Println("beego :" + beego.VERSION)
goversion, err := exec.Command("go", "version").Output()
if err != nil {
log.Fatal(err)
}
fmt.Println("Go :" + string(goversion))
2014-05-16 17:37:45 +00:00
}