2012-08-07 07:54:53 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"runtime"
|
2014-10-27 02:34:55 +08:00
|
|
|
|
2015-04-17 03:18:06 +08:00
|
|
|
"github.com/chrislusf/seaweedfs/go/util"
|
2012-08-07 07:54:53 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
var cmdVersion = &Command{
|
|
|
|
Run: runVersion,
|
|
|
|
UsageLine: "version",
|
2015-04-17 05:11:25 +08:00
|
|
|
Short: "print SeaweedFS version",
|
|
|
|
Long: `Version prints the SeaweedFS version`,
|
2012-08-07 07:54:53 +08:00
|
|
|
}
|
|
|
|
|
2012-09-24 17:01:53 +08:00
|
|
|
func runVersion(cmd *Command, args []string) bool {
|
2012-08-07 07:54:53 +08:00
|
|
|
if len(args) != 0 {
|
|
|
|
cmd.Usage()
|
|
|
|
}
|
|
|
|
|
2014-03-26 04:46:59 +08:00
|
|
|
fmt.Printf("version %s %s %s\n", util.VERSION, runtime.GOOS, runtime.GOARCH)
|
2012-08-07 09:20:26 +08:00
|
|
|
return true
|
2012-08-07 07:54:53 +08:00
|
|
|
}
|